Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

http://localhost/ not working on Windows 7. What's the problem?

Tags:

I have a big problem opening http://localhost/ on Windows 7 (beta). I installed this os and everything went great; when I installed Wamp I saw that localhost is not working at all. I just see this error:

Failed to Connect

Firefox can't establish a connection to the server at localhost.

in Mozilla and Explorer.

I removed Wamp and after some weeks (that means two weeks from today) I installed NetBeans on Windows 7. I created a test PHP script and when I debug it, I get the same error again. I tried to access it with ip 127.... but still the same. What is the problem?
When i installed NetBeans I installed it in port 8080.

like image 756
AXheladini Avatar asked May 01 '09 21:05

AXheladini


People also ask

Why is localhost not connecting?

The localhost simulates a web server running on your computer. When the “localhost refused to connect” error appears, it is likely due to misconfigured port. Other common reasons include insufficient permissions and the Apache webserver not running properly.

Why local host 8080 is not working?

You need to access your app with http in the URL not https when developing locally. You may have your web browser set to automatically try to upgrade the connection from http to https. If you, disable this setting.


2 Answers

If you installed it on port 8080, you need to access it on port 8080:

http://localhost:8080 or http://127.0.0.1:8080

like image 117
FlySwat Avatar answered Oct 02 '22 02:10

FlySwat


To fix the port 80 problem do:

From cmd as administrator:

  1. sc config http start= demand (you need a space after the equal sign and not before)
  2. Reboot
  3. Run the command (netsh http show servicestate) as administrator to check that the port 80 is in use

After you have run this command, you can disable http.sys as follows:

  1. net stop http (stop the process)
  2. Sc config http start= disabled (if you want to disable the service forever)

it works for me.

like image 39
fabio Avatar answered Oct 02 '22 01:10

fabio