views:

698

answers:

2

I'm running WAMP on Vista and have Apache virtual hosts and my hosts file all set up to allow me to test sites locally using an address like this:

http://testsitex.localhost:8080

Only problem is, it only works in Firefox. IE and Safari (currently the only other browsers I've tried, and the two I'm most concerned about) display an an error.

I'm not currently in front of my machine but the error is something along the lines of:

502 Bad Gateway Problem with DNS Host Lookup

Can anybody tell me what's going on?

A: 

Have you put testsitex.localhost into your HOSTS files?

Charlie Somerville
+2  A: 

I would try changing it from testsitex.localhost to testsite.loc and see if you have the same problem. Alternatively, try pinging it from the command prompt, and see if you're seeing the same problem.

Another thing might be that Firefox ignores the windows proxy, whereas IE and Safari likely use the default windows proxy (settings -> control panel -> internet -> connections -> lan settings). If your proxy doesn't have the hosts file, this would explain it.

FryGuy
The 502 error means an HTTP service replied. So it is either a set proxy (as you described, or a transparent proxy).
benc
If it were a transparent proxy, the HTTP request wouldn't leave the local machine, and instead use the hosts file IP address, which is localhost. I've definitely been burned by this on using a windows computer name to resolve an ip, but the proxy server isn't on the windows domain, causing a failure for everyone using IE (and the proxy), but not me because firefox ignores the proxy.
FryGuy