http://localhost/在Windows 7上不起作用.有什么问题? [英] http://localhost/ not working on Windows 7. What's the problem?

查看:107
本文介绍了http://localhost/在Windows 7上不起作用.有什么问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows 7(测试版)上打开 http://localhost/时,我遇到了很大的问题.我安装了这个操作系统,一切顺利.当我安装Wamp时,我看到localhost根本无法正常工作.我只看到这个错误:

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:

连接失败

Firefox无法在本地主机上建立与服务器的连接.

Failed to Connect

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

在Mozilla和资源管理器中.

in Mozilla and Explorer.

我删除了Wamp,几周后(即从今天起两周),我在Windows 7上安装了NetBeans.我创建了一个测试PHP脚本,当我对其进行调试时,我再次遇到相同的错误.我尝试使用ip 127来访问它.有什么问题吗?
当我安装NetBeans时,我将其安装在端口8080中.

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.

推荐答案

要解决端口80问题,请执行以下操作:

To fix the port 80 problem do:

以cmd身份作为管理员:

From cmd as administrator:

  1. sc config http start= demand(您需要在等号后面而不是空格之前)
  2. 重新启动
  3. 以管理员身份运行命令(netsh http show servicestate)以检查端口80是否正在使用中
  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

运行此命令后,可以按以下方式禁用http.sys:

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

  1. net stop http(停止该过程)
  2. Sc config http start= disabled(如果您想永久禁用该服务)
  1. net stop http (stop the process)
  2. Sc config http start= disabled (if you want to disable the service forever)

对我有用.

这篇关于http://localhost/在Windows 7上不起作用.有什么问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆