Forum Moderators: phranque
Apache:
<VirtualHost 127.0.0.5>
DocumentRoot /temp
ServerName www.temp.com
ServerAdmin webmaster@temp.com
ScriptAlias /cgi-bin/ /temp/cgi-bin/
TransferLog logs/tempaccess.log
ScriptLog logs/tempscripterror.log
</VirtualHost>
Windows hosts file entry:
127.0.0.5 www.temp.com
The dns cache knows that temp is on 127.0.0.5:
ipconfig /displaydnswww.temp.com
----------------------------------------
Record Name . . . . . : www.temp.com
Record Type . . . . . : 1
Time To Live . . . . : 568929
Data Length . . . . . : 4
Section . . . . . . . : Answer
A (Host) Record . . . : 127.0.0.5
I installed XP2, and note this hack no longer works!?
It is like apache never gets the request now and it never shows up in the apache log file as a request. The server does respond on 127.0.0.1 but not on 127.0.0.5?
How do i get apache to listen on those new ips for localhost?
any tips?
I'm wondering what your setup is with respect to the Listen, Port, and BindAddress directives. Apache Binding [httpd.apache.org]
It's possible that security-related XP services are tying up all unbound addresses and ports by default, and that turning off the windows firewall doesn't really remove those bindings (I've never played with this configuration myself, though, just a guess).
Jim
Pick a card - any card. (both installed on machine and both do the same jd)
Is not the virtualhost ip address the same a Listen command?
<VirtualHost 127.0.0.5>
DocumentRoot /temp
ServerName www.temp.com
</VirtualHost>
Other than that, the only other thing in the conf file that I think is important is that the servername is set to local host:
ServerName localhost
Jake, the server is there on any port I want to set it on, it is the IP address that is the issue.
127.0.0.1 blah.com
worked fine on my XP Pro SP2 box redirecting a valid domain to my local machine (as a matter of fact, I may set example.com to 127.0.0.1 just to mess with my roomie now). Unless 127.0.0.5 is bound to your NIC then it won't matter what you set in your HOSTS file for that IP address as it will try to find an address off your local machine, and network.
[edited by: Brett_Tabke at 12:39 pm (utc) on Jan. 23, 2005]
[edit reason] examplefied [/edit]