Help - Apache and removable USB storage drives
Posted: Thu Jul 12, 2007 11:18 pm
I have Apache 2.2 installed on win32 XP.
I have created local virtual hosts using 127.0.0.1
These work fine on C:\ drive which is my harddrive.
However if I use a removable E:\ USB storage device Apache will only run when the USB device is plugged in.
I get the following error if the USB is not plugged in:
[Fri Jul 13 15:32:11 2007] [error] [client 127.0.0.1] File does not exist: E:/myWeb/Dev/favicon.ico
This stops Apache from starting up and the only way around (at the moment) is to plug the USB storage device into E:\.
Is there a way to startup Apache and if the USB drive doesn't exist ignore it.
Should I be using some sort of logical which maps to a secondary file system if the USB device is not plugged in? Or is there an Apache switch that says ignore this virtual host if it can't be found.
I have the following configuration for http://dev.local which points to the USB E:\ drive
----
C:\WINDOWS\SYSTEM32\DRIVERS\ETC\HOSTS
127.0.0.1 dev.local
----
Apache2.2\conf\extra\httpd-userdir.conf
----
Apache2.2\conf\extra\httpd-vhosts.conf
Thank you for any ideas in advance as I haven't found anything on the search engines.
I have created local virtual hosts using 127.0.0.1
These work fine on C:\ drive which is my harddrive.
However if I use a removable E:\ USB storage device Apache will only run when the USB device is plugged in.
I get the following error if the USB is not plugged in:
[Fri Jul 13 15:32:11 2007] [error] [client 127.0.0.1] File does not exist: E:/myWeb/Dev/favicon.ico
This stops Apache from starting up and the only way around (at the moment) is to plug the USB storage device into E:\.
Is there a way to startup Apache and if the USB drive doesn't exist ignore it.
Should I be using some sort of logical which maps to a secondary file system if the USB device is not plugged in? Or is there an Apache switch that says ignore this virtual host if it can't be found.
I have the following configuration for http://dev.local which points to the USB E:\ drive
----
C:\WINDOWS\SYSTEM32\DRIVERS\ETC\HOSTS
127.0.0.1 dev.local
----
Apache2.2\conf\extra\httpd-userdir.conf
Code: Select all
<Directory "E:\MyWeb\dev">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>----
Apache2.2\conf\extra\httpd-vhosts.conf
Code: Select all
<VirtualHost 127.0.0.1:80>
DocumentRoot "E:\MyWeb\dev"
ServerName dev.local
ServerAlias www.dev.local
ErrorLog logs/dev.error.log
CustomLog logs/dev.access.log common
</VirtualHost>