Forum Moderators: phranque
I had two virtual hosts configured and running happily while setup under Apach 2.0.52, PHP 5.0.3, MySQL 4.1.9, OpenSSL 0.9.7d, and ActivePerl 5.8.6.811 on Win XP SP1.
After the reinstallation I simply copied the httpd.conf and php.ini file back to their respective directories and reconfigured all the rest of my server software according to the way it was setup before. However, only "localhost" is accessible now. I have not changed any of the settings from what they were when the VirtualHost configuration was working.
NameVirtualHost 127.0.0.1<VirtualHost 127.0.0.1>
DocumentRoot "C:\sites\testsite"
ServerName testsite.local
</VirtualHost><VirtualHost 127.0.0.1>
DocumentRoot "C:\sites\testsite2"
ServerName testsite2.local
</VirtualHost>
If I visit "testsite.local" I am met with a site not found error. If I visit "localhost" the default site loads (which is set as "C:\sites\testsite") but no images will show up. Each image on the main page is referenced by URLs like "/images/something.gif" in the HTML code. If I right click on an image and view its properties I see that the Location is listed as "http://testsite.local/images/something.gif".
I opened the Windows command prompt and ran "apache -S" which states that the VirtualHost configuration is valid.
I decided to play around with the configuration and added the following to the first <VirtualHost> configuration:
ErrorLog "C:\sites\testsite\log"
This directory does exist and is writeable. However, if I try to start Apache I am met with a "The requested operation has failed" alert box. Nothing shows up in the Apache log files concerning this and the "apache -S" test also states that this VirtualHost configuration is valid. Apache will not start again unless I comment out this statement.
I tried disabling both the Windows XP firewall and Norton Internet Worm Protection, but this makes no difference.
I tried changing <VirtualHost 127.0.0.1> to be <VirtualHost *> with a corresponding change in NameVirtualHost, but this also makes no difference.
I have searched and searched for an answer to this problem but have not found anything to date. As no discernable error is produced by Apache I cannot figure what could be wrong. I am at a complete loss.
Thanks in advance for any help!
Welcome to WebmasterWorld!
There was a mention of an XP SP2-related problem in this recent thread [webmasterworld.com]. A patch is available from Microsoft if this is the cause of your problem.
Jim