http://localhost gets "failed to connect"

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

http://localhost gets "failed to connect"

Postby victors » 29. April 2009 02:51

I cannot connect to localhost.

I have checked several things:

1) Fails on both Firefox and Internet Explorer
2) Windows firewall is off
3) Apache is running (Port 80)

The message when I try http://localhost is
"Failed to Connect"

Somehow I got this to work on my job computer, but can't on this one. Running XP.

Any help is appreciated.
victors
 
Posts: 2
Joined: 29. April 2009 02:44

Re: http://localhost gets "failed to connect"

Postby Sharley » 29. April 2009 02:55

Is the XP SP3?

Can you see the XAMPP Welcome Page using http://127.0.0.1
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: http://localhost gets "failed to connect"

Postby victors » 29. April 2009 21:52

Thanks for the reply.

No this doesn't work either.
victors
 
Posts: 2
Joined: 29. April 2009 02:44

Re: http://localhost gets "failed to connect"

Postby Sharley » 29. April 2009 23:17

victors wrote:No this doesn't work either.
Anything in the server's error log?
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: http://localhost gets "failed to connect"

Postby David F. » 30. April 2009 10:45

I had the same problem yesterday, installing XAMPP on a system with Windows Vista Business using Internet Explorer or Mozilla Firefox.

I solved the problem the following way:

1. I identified my local IP-adress by ipconfig /all in the system console. (i. e. 192.168.1.13)
2. I gave the browser the local IP-adress as input (in this case http://192.168.1.13)

Do not ask me, why I was successful, because I am an absolutely beginner (I installed XAMPP and JOOMLA yesterday and it was my first installatin of a web-application! I am a simple user, no technician, developper or anything else!). Perhaps another more experienced user could explain me my mistake and how I can realize access by the normal adress http://localhost?
User avatar
David F.
 
Posts: 2
Joined: 30. April 2009 10:30
Location: Black Forrest / South-West Germany

Re: http://localhost gets "failed to connect"

Postby Sharley » 30. April 2009 10:53

This is only 1 item to check for a possible fix for no localhost and/or 127.0.0.1 access on the PC that XAMPP is installed on.

Open C:\Windows\system32\drivers\etc\Hosts file in your text editor and look for:
127.0.0.1 localhost
If it is not included then add it as the first line after all the commented lines.

Also if you have this line:
::1 localhost
Comment it out so it looks like this:
# ::1 localhost

Now the first 2 lines should look like this:
127.0.0.1 localhost
# ::1 localhost


Save the file and try again to access http://localhost or http://127.0.0.1



Also check that firewall access is allowing access and virus scanners are allowing access - temporarily disable these to test.

In Vista make sure you have disabled UAC and you are logged in as an administrator or a super administrator.

And of course make sure that Apache and MySQL are both actually running.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: http://localhost gets "failed to connect"

Postby David F. » 30. April 2009 15:04

Indeed the change of the hosts-file in Vista solved the problem.

A thing which I do not understand is, that the XAMPP-installation on another computer with Vista Ultimate was without problems in the hosts-file while the installation on the computer with Vista Business has the described problem as a consequence!?!
User avatar
David F.
 
Posts: 2
Joined: 30. April 2009 10:30
Location: Black Forrest / South-West Germany


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 40 guests