http://localhost/ not working on Windows 7. What#39;s the problem?(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 无法在 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)- Reboot
- 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:
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 上不起作用.有什么问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:http://localhost/在 Windows 7 上不起作用.有什么问题?


- Mod使用GET变量将子域重写为PHP 2021-01-01
- 如何定位 php.ini 文件 (xampp) 2022-01-01
- PHP Count 布尔数组中真值的数量 2021-01-01
- SoapClient 设置自定义 HTTP Header 2021-01-01
- 正确分离 PHP 中的逻辑/样式 2021-01-01
- Laravel 仓库 2022-01-01
- 带有通配符的 Laravel 验证器 2021-01-01
- 从 PHP 中的输入表单获取日期 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- 没有作曲家的 PSR4 自动加载 2022-01-01