6

I'm using Firefox (3.6.17) on my Ubuntu Lucid (rel. 10.04) and noticed that if the network cable is plugged everything is fine and I'm able to browse my local virtualhost configured in Apache2.

But if I unplug the network, the local vhost is no longer reachable by Firefox and shows the message:

Server not found
Firefox can't find the server at atn-dev.hal901.com

I think Linux and Apache2 are configured correctly because wget and Chromium browser are still able to contact the vhost. It seems to be a Firefox bug.

The problem is I widely use Firefox and I need it for web development. Firefox is only able to reach http://localhost/ when network is unplugged.

I know there is the Firefox "Work Offline" option in the File menu, but I already unchecked it.
Moreover I completely disabled it through the about:config page, setting browser.offline property to false.

Can anyone figure out a solution?

random
  • 15,201
Carlo
  • 63

3 Answers3

4

Try going to about:config, and search for network.dns.disableIPv6. Set this to false, and then see if network name resolution works.

This person seemed to be having the same issue as you are, and was able to fix it by using that.

Darth Android
  • 38,658
0

My bet is that it is unable to resolve atn-dev.hal901.com when the cable is unplugged, and the other browsers are caching the DNS result from previous lookups. Have you tried adding the domain to your /etc/hosts file?
sudo echo "127.0.0.1 atn-dev.hal901.com" >> /etc/hosts

Your other solution would be the assign a ServerPath to the vhost, such as adding the ServerPath /atn-dev directive to the configuration (usually just below the ServerName directive). You could then access the vhost at http://127.0.0.0/atn-dev/

Darth Android
  • 38,658
-1

I'm on Xubuntu 14.04 / Firefox 30.0, and I'm still having the same problem. the suggested fix, setting network.dns.disableIPv6 to false, didn't work for me. While I'd still like to have this fixed in another way (comments welcome), a workaround is to put Firefox into offline mode.