OK, the title may be a bit confuse.
I have a TrueCrypt container that gets mounted as a new drive X: on my Windows machine. Now I want my local testing Apache to deliver files from there via http://x.localhost
:
<VirtualHost *:80>
DocumentRoot "X:/htdocs"
ServerName x.localhost
<Directory "X:/htdocs">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
So far so good. When the TrueCrypt container is mounted, all is well. My problem starts when there is no drive 'X:' (which is unfortunately the regular case). Then, Apache refuses to start because it complains about missing folders for DocumentRoot and the <Directory>
directive.
Is there a possibility to have some savvy switch implemented so that Apache does start even if no drive X: is present?
Under unix, Apache will warn about a document root missing, but will still continue.
You could try:
You specify a docroot that does exist. You probably want a better directory, probably one that's empty. Next we alias the root uri on top to the docroot. Finally, we use a uri based block rather than a path based block.