在 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 无法在 localhost 上建立与服务器的连接.
Failed to Connect
Firefox can't establish a connection to the server at localhost.
在 Mozilla 和 Explorer 中.
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端口问题:
从 cmd 以管理员身份:
From cmd as administrator:
sc config http start= demand
(等号后面需要一个空格,而不是前面)netsh http show servicestate
) 以检查端口 80 是否正在使用中sc config http start= demand
(you need a space after the equal sign and not before)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:
net stop http
(停止进程)Sc config http start= disabled
(如果你想永久禁用该服务)net stop http
(stop the process)Sc config http start= disabled
(if you want to disable the service forever)它对我有用.
这篇关于http://localhost/在 Windows 7 上不起作用.有什么问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!