Help - Apache and removable USB storage drives

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
Dr.Goodvibes
Forum Newbie
Posts: 19
Joined: Wed May 24, 2006 10:14 am
Location: New Zealand

Help - Apache and removable USB storage drives

Post by Dr.Goodvibes »

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

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>
Thank you for any ideas in advance as I haven't found anything on the search engines.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

I think there is a way you can disable favicons, which might be the way to solve this little issue.
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

So... you installed apache on your removable drive, and you're confused as to why it doesnt work when it's not plugged in?

/me slits his wrists...
Post Reply