Apache w/out internet connection

1

I have a Vista laptop that I have been running Apache / MySql / Php / PhpMyAdmin on for quite some time without fail. I just use it to test bits of code here and there etc. No problems, until recently when I needed to test something and I happened to be in a place that I could not get an internet connection. Why am I unable to access localhost from the same machine without an internet connection? I am type http://localhost..etc into the browser's address bar and I get the message that I am unable to access without an internet connection. I checked my windows/system32/etc/hosts file and the first two lines are

127.0.0.1 localhost

::1 localhost

What am I missing here?

robert knobulous

Posted 2009-10-08T16:21:22.613

Reputation:

2Is the server up? Have you checked? – Vinko Vrsalovic – 2009-10-08T16:25:04.477

Do you mean http://localhost/etc? (/, not ..) – SLaks – 2009-10-08T16:25:24.197

Why do you have localhost in your hosts file twice? There should only be one entry that is 127.0.0.1 localhost – None – 2009-10-08T16:29:10.570

2@James Goodwin - "::1 localhost" is for IPv6 – Mark – 2009-10-08T16:37:54.217

Do you use http://localhost/ when you have internet plugged in, or just when you are not connected? If so, then the problem most likely is a wrongly configured NameVirtualHost directive.

– Raynet – 2009-10-09T00:35:17.433

Answers

0

I had this issue once on an older version of windows, where I needed to dial up to make the loopback (127.0.0.1) work.

http://www.windowsnetworking.com/articles_tutorials/Install-Microsoft-Loopback-adapter-Windows-XP.html

You should be able to install a loopback adapter (software driver as described in the article above), but you might consider get a router and make your own little development network instead.

tovare

Posted 2009-10-08T16:21:22.613

Reputation: 583

0

Do you need to stick a loopback Ethernet plug into your ethernet port?

http://www.tikkiweb.net/loopback

http://www.thinkgeek.com/gadgets/tools/6c20/

user14050

Posted 2009-10-08T16:21:22.613

Reputation: 109

1This is not required to access localhost from a web browser. – None – 2009-10-08T16:30:45.870

0

I think it's just a problem with the browser. If you are on Firefox and there is no internet connection it will put you into "offline mode". Check this by going to File > Work Offline

phunehehe

Posted 2009-10-08T16:21:22.613

Reputation: 777

The tcp/ip stack with loopback is started along with the configured network connection in many versions of windows. – tovare – 2010-09-06T20:26:19.410

It happens with both Mozilla and IE... Oh and Opera too. – None – 2009-10-08T16:28:57.573

this seems most likely to me, assuming the OP's URL is misreported :) – quack quixote – 2009-11-27T20:58:15.280

0

This means that the Apache server is not running or you have the port configured to a different port on your machine.

Another potential issue is that the host name of apache may be different than 127.0.0.1 or localhost.

monksy

Posted 2009-10-08T16:21:22.613

Reputation: 1 631