Localhost doesn't work anymore

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Localhost doesn't work anymore

Postby w4vy » 22. August 2008 13:55

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
Image
User avatar
w4vy
 
Posts: 153
Joined: 04. June 2008 09:58
Location: England

Postby glitzi85 » 22. August 2008 14:00

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
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim

Postby w4vy » 22. August 2008 14:06

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
Image
User avatar
w4vy
 
Posts: 153
Joined: 04. June 2008 09:58
Location: England

Postby glitzi85 » 22. August 2008 14:11

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
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim

Postby w4vy » 22. August 2008 14:18

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 :)
Image
User avatar
w4vy
 
Posts: 153
Joined: 04. June 2008 09:58
Location: England


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 151 guests