Page 1 of 1

Localhost doesn't work anymore

PostPosted: 22. August 2008 13:55
by w4vy
Hi Can anyone give me some advice as to why Localhost would stop working all of a sudden please. I cannot access 127.0.0.1 nor 0.0.0.0 either so I cannot access PHPMyAdmin and if I place 127.0.0.1 mysite.com in my Hosts file then I cannot access my site from the web too.

Here are the tests I have made :-

Only thing inside my Host file now is 127.0.0.1 Localhost, I have turned off every peice of security software I have and nothing :( still.

Computer is Vista sp1 and I had sp1 before xampp so its not that.

Any ideas for me plz ? Something maybe I can try ? thankyou.

w4vy

PostPosted: 22. August 2008 14:00
by glitzi85
Is the Server listening on Port 80? Check that by opening a command window (Start -> Run -> cmd.exe) and typing
Code: Select all
netstat -a


glitzi

PostPosted: 22. August 2008 14:06
by w4vy
glitzi85 wrote:Is the Server listening on Port 80? Check that by opening a command window (Start -> Run -> cmd.exe) and typing
Code: Select all
netstat -a


glitzi


I did what you said and got loads of results from 192.168.0.2 & 127.0.0.1 & 0.0.0.0 all listening and waiting for something. on a side note though in my httpd.conf file it says Listen 192.168.0.2:80 so should I change that to 127.0.0.1:80 ? or have both Listens ?

w4vy

PostPosted: 22. August 2008 14:11
by glitzi85
In the output of netstat you can see on which ports the applications are listening. If there is not IP:80, no webserver is running.

I personally prefer Listen *:80 in httpd.conf. Then the webserver listen on all available network interfaces. If you set it to 192.168.0.2:80, your webserver will NOT respond on localhost, as this is 127.0.0.1 and there is no webserver. Also the server will maybe not be able to start if this IP is not assigned at the moment (eg when no network cable is plugged in).

So the easiest way is to just change to Listen *:80 and restart Apache.

glitzi

PostPosted: 22. August 2008 14:18
by w4vy
Ok great localhost works again :D thanks glitzi you redeemed yourself :P Now I just need to get SSL to work and mercury and FTP and im all set :)