views:

514

answers:

4

i have open my httpd or apache , it works when online , but not when offline ...

A: 

anything to do with the etc/host file? Do you have localhost defined in there?

If not, your machine may be using DNS to resolve localhost, where if it is set in the host file, you should be able to access it while offline.

Senica Gonzalez allebrum.com

Senica Gonzalez
# hostname localhost.localdomain added to /etc/hosts by anaconda127.0.0.1 localhost.localdomain localhost::1 localhost6.localdomain6 localhost6 localhost.localdomaini think this means that i have set it already , right?
wizztjh
+1  A: 

127.0.0.1 should work regardless of what's in /etc/hosts

If you do an ifconfig do you see the lo loopback interface?

This may be a better question for superuser or serverfault

prestomation
+3  A: 

This is a bug in Google Chrome. Starting Chrome with --enable-ipv6 fixes it.

See http://code.google.com/p/chromium/issues/detail?id=42058 for details.

Julien Portalier
wow , it works!! That time searched for sooo long d , haha , thx
wizztjh
+1  A: 

in ubuntu, when offline. you can use ifconfig command manually to config the ethernet card. e.g. eth0 a ip. then you can access localhost.

for example: ifconfig eth0 192.168.1.101

hyliker

related questions