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

后端 未结 22 1789
眼角桃花
眼角桃花 2020-12-03 01:07

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

相关标签:
22条回答
  • 2020-12-03 01:56

    Well you are getting a 404, so the web server is running, it just can't find the file.

    Check the http.conf file. If it pointing to the right root directory?

    If you are using different ports, then check http.conf to see if Apache is listening on the right port, or if apache is redirecting traffic on the port to anther root directory.

    Maybe posting your http.conf file might help?

    0 讨论(0)
  • 2020-12-03 01:57

    Edit your C:\Windows\System32\drivers\etc\hosts file

    Make sure there is an entry that looks like this:

    127.0.0.1   localhost
    

    If there is an entry like

    ::  localhost
    

    Comment it out to look like this

    \#:: localhost
    

    This should fix your problem, I've had this problem in the past.

    0 讨论(0)
  • 2020-12-03 01:58

    Maybe Skype or other Application is using port 80. This you can check in

    Tools->Settings->Advanced->Connection

    0 讨论(0)
  • 2020-12-03 02:03

    For me, it was skype causing the problem. Once I stopped skype, everything worked. I have 1.7.1 xampp (mysql and apache) running on Windows 7 x64.

    0 讨论(0)
  • 2020-12-03 02:05

    If you're still having this problem, try this:

    1. Edit your hosts file (with elevated privileges)
    2. Uncomment the line "#127.0.0.1 localhost" (ie- remove the #)
    3. Save the file as is. hosts with no extension

    In Win7 MS has decided to comment the localhost line with that msg that says it's handled in dns. I'm still not exactly clear what they're getting at, except maybe that they're telling folks to use dns for localhost resolution instead of the hosts file. Probably safer that way, anyway.

    0 讨论(0)
  • 2020-12-03 02:05

    For me this did the trick at port 80 in the end:

    • You have to disable the http.sys service manually via the registry:

      1. Launch RegEdit:
      2. Go to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP
      3. Add a new DWORD (32-bit) value
      4. Name it ‘NoRun’ not including the quotes
      5. Double click the new property
      6. In the Value data field type ’1' not including quotes and click OK
      7. Re-boot your computer

    You should now find that Apache will start on port 80!

    0 讨论(0)
提交回复
热议问题