Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: The connection was refused when attempting to contact localh |
|
Author |
|
NellyMcCool
Joined: 12 Mar 2009 Posts: 2 Location: Ireland
|
Posted: Thu 12 Mar '09 10:35 Post subject: The connection was refused when attempting to contact localh |
|
|
I have been using Apache 2.2 with php and mysql for about a year with no problems. However, suddenly without changing any settings, when I enter "localhost" and alias paths to whatever site Im working on, into my browser, I get the message "Failed to Connect. The connection was refused when attempting to contact localhost.Though the site seems valid, the browser was unable to establish a connection." This happens on all browsers. I have checked the httpd.conf file in apache, and it is listening to port 80. When I enter 127.0.0.1 and the alias, instead of the word "localhost" it works. I have tried changing to port 8080, but the same problem happens. Can anybody explain this? Thanks so much for your generous help in advance! |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Thu 12 Mar '09 17:37 Post subject: |
|
|
Sounds like something may have changed your host file.
C:\Windows\System32\drivers\etc\hosts (no file extension)
make sure you see a line
127.0.0.1 localhost
inside the file. |
|
Back to top |
|
NellyMcCool
Joined: 12 Mar 2009 Posts: 2 Location: Ireland
|
Posted: Thu 12 Mar '09 21:26 Post subject: |
|
|
Woo Hoo it worked!! Thank you so much glsmith. Its incredible how time consuming a little problem like that is when you dont know where to look. When I get more experience, I will definitely use any skill I have to help others! |
|
Back to top |
|
|
|
|
|
|