php 为什么 http://localhost/ 不使用 WAMP 加载任何内容?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6246938/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 23:46:50  来源:igfitidea点击:

Why doesn't http://localhost/ load anything with WAMP?

phplocalhostwamp

提问by John Doe

I recently tried installing WAMP but found that none of the pages will load. It also has an orange W logo, if that means anything. It does say (Tray Icon) that the WAMPserver is onlinethough. I also did some research and found that Skype may cause problems and I removed the Use port 80 and 443 as alternatives for incoming connectionsoption, but it still won't work. I get the following screen in my Chrome browser, any ideas?

我最近尝试安装 WAMP,但发现没有任何页面会加载。它还有一个橙色的 W 标志,如果这意味着什么的话。它确实说(托盘图标)WAMPserver 是在线的。我也做了一些研究,发现 Skype 可能会导致问题,我删除了使用端口 80 和 443 作为传入连接的替代选项,但它仍然不起作用。我在 Chrome 浏览器中看到以下屏幕,有什么想法吗?

localhost isn't loading...

本地主机未加载...

EDIT:After further research I found that something may have gone wrong with the installation and Skype. I don't know how this happened but after a re-instillation everything worked fine. Thanks for your guy's help.

编辑:经过进一步研究,我发现安装和 Skype 可能出现问题。我不知道这是怎么发生的,但重新灌注后一切正常。谢谢你的家伙的帮助。

回答by no.good.at.coding

The orange logo indicates that at least one service failed to start. You might try the following to troubleshoot the underlying reason:

橙色标志表示至少一项服务未能启动。您可以尝试以下方法来解决根本原因:

  1. Check that the Apache service is running. Left-click the WAMP tray icon and check that under Apache > Service, the option to start the service is disabled/grayed out. If not, your Apache service isn't running and that's the cause.

  2. Check the port Apache is listening on. Again. left-click the WAMP icon, Apache > httpd.confshould open the configuration. Look for the Listen XXdirective and note what the value for XXis. If not 80, you should use the url http://localhost:XXinstead.

  3. If the value for Listenwas indeed 80, you might want to check what process is bound to port 80. Left-click the tray icon, Apache > Service > Test port 80. This should tell you what process is bound to port 80. If nothing is listening at port 80, you should see the message Your port 80 is not actually used.. If Apache actually is listening on that port, you should see something like Apache/<version> (Win32) PHP/<version>.

  4. Finally, check the Apache error log. Left-click the icon, Apache > Apache error log. Scroll to the end of the file and look for any messages that might be relevant.

  5. Try a different browser

  6. Telnet to port XXand see if you're able to connect.

  1. 检查 Apache 服务是否正在运行。左键单击 WAMP 托盘图标并检查下Apache > Service,启动服务的选项已禁用/变灰。如果没有,您的 Apache 服务没有运行,这就是原因。

  2. 检查 Apache 正在侦听的端口。再次。左键单击 WAMP 图标,Apache > httpd.conf应打开配置。查找Listen XX指令并注意其值XX是什么。如果没有80,您应该改用 url http://localhost:XX

  3. 如果 的值Listen确实是80,您可能想要检查绑定到端口的进程80。左键单击托盘图标Apache > Service > Test port 80。这应该告诉您绑定到 port 的进程80。如果端口没有侦听80,您应该会看到该消息Your port 80 is not actually used.。如果 Apache 实际上正在侦听该端口,您应该会看到类似Apache/<version> (Win32) PHP/<version>.

  4. 最后,检查Apache错误日志。左键单击图标Apache > Apache error log。滚动到文件末尾并查找可能相关的任何消息。

  5. 尝试不同的浏览器

  6. Telnet 到端口XX,看看你是否能够连接。

回答by Erfan Safarpoor

For this problem go :

对于这个问题去:

wamp > Apache > Service > Install Service

After Install Your Apache Is Ok :D

安装 Apache 后一切正常 :D

   if not running, open this address use your web browser:
   127.0.0.1

(usually This problem see in Windows 8)

(通常这个问题在 Windows 8 中看到

回答by Joerg

Skype uses port 80 if it is free. No need to uninstall skype, just start your webserver before skype and everything should be fine. Skype will find another port.

如果免费,Skype 使用端口 80。无需卸载Skype,只需在Skype 之前启动您的网络服务器,一切都应该没问题。Skype 会找到另一个端口。