MozillaZine

Apache, virtual host, won't listen to 127.0.0.2

Discussion of general topics about Mozilla Firefox
Jong
 
Posts: 6
Joined: June 25th, 2004, 8:48 am

Post Posted July 10th, 2004, 4:24 pm

I'm running a local Apache server, and done some virtual host settings, and my problem is now that I can't get Firefox to listen to ip 127.0.0.2, eventhough I have also edited the hosts file in Windows XP.

Any hint or link would be appreciated, thanks :)

P.S. I have Firefox version 0.8

Racer
 
Posts: 6108
Joined: November 18th, 2002, 11:07 am

Post Posted July 10th, 2004, 4:27 pm

127.0.0.2 ? localhost is 127.0.0.1 in 99.9999% of the world

Jong
 
Posts: 6
Joined: June 25th, 2004, 8:48 am

Post Posted July 10th, 2004, 4:38 pm

I know :) and Firefox has no problem with 127.0.0.1.

Virtual host is a kind of "fake domain" in my case, which allows you to configurate a virtual ip address to point on another directory than the standard one. Better I can't explain it :)

P.S. Internet Explorer and Opera has no problem listening to 127.0.0.2

logan

User avatar
 
Posts: 3453
Joined: May 22nd, 2003, 3:51 pm
Location: NGC 2403

Post Posted July 10th, 2004, 5:07 pm

I don't know what your config looks like, but if you are using NameVirtualHost, you don't have to use multiple ip addresses (unless you are doing ssl). I imagine you already have it bound to 127.0.0.1, with a Listen statement or such.

NameVirtualHost *

<VirtualHost *>
ServerName www.domain.com
ServerAlias domain.com
...
</VirtualHost>

<VirtualHost *>
ServerName www.domain.org
ServerAlias domain.org
...
</VirtualHost>

...

Apache then reads the Host: header sent by the browser, matches it up to the ServerName/Alias and uses the appropriate VirtualHost.

I don't know what kindof error you are getting, or why firefox canot hit 127.0.0.2.

Jong
 
Posts: 6
Joined: June 25th, 2004, 8:48 am

Post Posted July 10th, 2004, 5:32 pm

httpd.conf:
NameVirtualHost 127.0.0.2

<VirtualHost 127.0.0.2>
DocumentRoot c:/test
ServerName test.localhost
</VirtualHost>

hosts:
127.0.0.1 localhost
127.0.0.2 test.localhost

the error message:
While trying to retrieve the URL: http://test.localhost/

The following error was encountered:
Unable to determine IP address from host name for test.localhost

The dnsserver returned:
Name Error: The domain name does not exist.

This means that:
The cache was not able to resolve the hostname presented in the URL.
Check if the address is correct.

Jong
 
Posts: 6
Joined: June 25th, 2004, 8:48 am

Post Posted July 14th, 2004, 11:58 pm

Problem solved. I disabled the proxy settings, which seems to do the magic trick :)

Return to Firefox General


Who is online

Users browsing this forum: Bing [Bot] and 6 guests