can't access localhost

running 11.1 with Lamp pkg installed. cannot access localhost at all,
but can access all other web sites. any suggestions sure appreciated.
Linux newbie and trying hard!!

many thanks


emilemma

emilemma’s Profile: http://forums.opensuse.org/member.php?userid=15718
View this thread: http://forums.opensuse.org/showthread.php?t=406557

Does /etc/hosts contain this line:

> 127.0.0.1 localhost

Do you have the Apache web server running?


ken_yap

ken_yap’s Profile: http://forums.opensuse.org/member.php?userid=221
View this thread: http://forums.opensuse.org/showthread.php?t=406557

yes apache is running. problem seems to be - no /etc/hosts file.
how do i create one?


emilemma

emilemma’s Profile: http://forums.opensuse.org/member.php?userid=15718
View this thread: http://forums.opensuse.org/showthread.php?t=406557

Normally /etc/hosts should be there. If it doesn’t exist, you may have a
faulty installation which might give problems in other areas. You should
look into that.

Anyway for this problem, all you need is this line in /etc/hosts:

Code:

127.0.0.1 localhost

which you can add with a text editor (as root, of course). And the file
must be publicly readable, so do

Code:

chmod 644 /etc/hosts

after editing it.


ken_yap

ken_yap’s Profile: http://forums.opensuse.org/member.php?userid=221
View this thread: http://forums.opensuse.org/showthread.php?t=406557

yes i think you are right. will do a re-install ad see what happens

many thanks for help!!!


emilemma

emilemma’s Profile: http://forums.opensuse.org/member.php?userid=15718
View this thread: http://forums.opensuse.org/showthread.php?t=406557