Forum Moderators: phranque

Message Too Old, No Replies

VirtualHosts when not connected to network

don't work

         

RonPK

9:19 am on Dec 12, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've got a number of vhosts up and running on my Windows XP Home laptop, running Apache 2.2. They all work like a charm, but only when the laptop is connected to a network. If there is no network, the browser says the server is not available. But localhost and 127.0.0.1 can be reached fine.

Here is my setup:
In the Windows hosts file:

127.0.0.1 localhost 
127.0.0.1 mysite

In Apache's extra/httpd-vhosts.conf:

NameVirtualHost *:80 
<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
</VirtualHost>
<VirtualHost *:80>
ServerName mysite
DocumentRoot C:/projects/mysite
</VirtualHost>

Any suggestions on how I can make the virtual hosts available when not connected would be much appreciated!

gergoe

11:18 am on Dec 12, 2007 (gmt 0)

10+ Year Member



What Listen or Bind directives you have defined in your httpd.conf?

RonPK

1:50 pm on Dec 12, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Listen 80 
[..]
ServerName localhost:80

gergoe

2:10 pm on Dec 12, 2007 (gmt 0)

10+ Year Member



Then try defining Listen 127.0.0.1:80 instead of Listen 80 only, that might circumvent the problem. By the way, Apache normally has no problem with disappearing network interfaces, so this is either due to a malfunctioning driver, or a third party software.

RonPK

2:55 pm on Dec 12, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Changing the Listen-setting didn't help.
My prime suspect for creating network mess was the VMWare player, as it sets up a couple of virtual network interfaces. But uninstalling that didn't help either. The culprit turned out to be Comodo firewall. When I disabled the firewall the virtual hosts immediately could be reached (hits forehead for not checking the firewall before posting here).

Thanks for your help, gergoe.