本地主机无法在 XAMPP 上运行

发布于 2024-09-29 22:17:19 字数 976 浏览 0 评论 0原文

我的线程面临同样的问题。我已经仔细阅读了解决方案中提供的所有建议。我已经搜索了所有可能的解决方案,但没有任何解决办法。

“http://stackoverflow.com/questions/817745/localhost-not-working-on-xampp-both-service-apache-mysql-are-fine”

我保证: 1. Xampp 已成功启动(在日志中),但未收到任何请求(检查 access.log)。 还确保它在配置文件中的端口 80 上运行。

  1. 确认应用程序的状态

使用 netstat C:\Documents and Settings\user>netstat -aon | grep 80 TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 3524

  1. 检查 /windows/system32/drivers/etc/hosts 中的主机文件,只有一项

127.0.0.1 localhost

  1. skype teamviewer 或其他应用程序已关闭并配置为不使用端口 80。

  2. 确保 Windows 防火墙允许 http 进程使用端口 80。

  3. ping localhost、127.0.0.1 和我的 IP (192.168.1.2)。 localhost 解析为 127.0.0.1

  4. 尝试了不同的 url http:// localhost http:// localhost:80 http:// 127.0.0.1 http://laptop-name 但没有任何效果。浏览器只是等待响应(http后面有空格以允许本文中的链接)

  5. 确保index.php 中没有循环(它未受影响)并且也有index.html。还尝试了不同的路径

但没有任何结果。我很恼火,我不想格式化我的机器。请帮忙....

I am facing same problem to the thread. I've gone through all the suggestions provided in the solution. I've searched all possible solution but nothing gonna workout.

"http://stackoverflow.com/questions/817745/localhost-not-working-on-xampp-both-service-apache-mysql-are-fine"

I've ensured :
1. Xampp is successfully started (in log) but it is not receiving any request(checked access.log).
also ensured that it is running on port 80 in config file.

  1. confirmed status of application using netstat

C:\Documents and Settings\user>netstat -aon | grep 80
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 3524

  1. Checked host file in /windows/system32/drivers/etc/hosts and has only one entry

127.0.0.1 localhost

  1. skype teamviewer or other application are closed and configured not to use port 80.

  2. ensured that windows firewall allows http process to use port 80.

  3. pinged localhost, 127.0.0.1 and my ip (192.168.1.2). localhost resolves to 127.0.0.1

  4. tried different urls http:// localhost http:// localhost:80 http:// 127.0.0.1 http:// laptop-name but nothing works. browser just waits for response (spaces after http to allow links in this post)

  5. ensured that there is no loop in index.php(it is untouched) and also has index.html. also tried diffent paths

nothing gonnna work out. I am irritated and I dont want to format my machine. please help....

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

冬天旳寂寞 2024-10-06 22:17:19

当这种情况发生在我身上时,通常是 Skype 接管了默认的本地主机地址

when this happens to me it is usually Skype taking over the default localhost address

缱倦旧时光 2024-10-06 22:17:19

检查命令提示符

netstat -a -b

并使用 80 端口 关闭任何其他应用程序,例如 skype 等。

Check on command prompt

netstat -a -b

And close any other application like skype etc using 80 port.

故事还在继续 2024-10-06 22:17:19

尝试停止 IIS。这对我有用。

  1. 选择“开始”,然后在搜索框中键入 IIS
  2. 选择“Internet 信息服务管理器”
  3. 在右侧管理器中的“管理服务器”下选择“停止”

Try stopping IIS. It worked for me.

  1. Select Start, then type IIS in the search box
  2. select Internet Information Services Manager
  3. In the manager on the right under "Manage server"select "stop"
风和你 2024-10-06 22:17:19

我在使用 Last.fm 时遇到了与您的问题非常相似的问题,我发现这是软件冲突。

Last FM scrobbler 应用程序无法在我的新版本上完成安装,因为它无法登录或验证我的用户名。我尝试了常规的 scrobbler 应用程序,然后尝试了 Windows 7 64 位上的测试版桌面程序。我怀疑是 Skype 或 TeamViewer,但即使停止或退出这些程序后,这两个安装版本都无法登录到服务。

  • Beta 版桌面应用程序实际上通过我的互联网浏览器在 127.0.0.1(随机端口)上进行了身份验证,但我的浏览器在尝试通过该端口发送数据时会超时。
  • 我在 Windows 中检查并编辑了 HOSTS 文件,但这也没有解决问题。
  • Ping 127.0.0.1 有效,但 Ping 任何端口变体都会超时。

最后,我决定卸载Sphinx Software制作的Windows 7防火墙控制程序。请注意,我已将防火墙设置为在启动时禁用(干净启动 - 通过 MSConfig 禁用所有启动程序)。

我确保防火墙程序根本没有在我的服务中运行。然而,卸载软件后,即使没有重新启动计算机,127.0.0.1 也会在所有端口上打开,我的 Last.fm scrobbler 终于连接并完成安装。

因此,它可能是一个隐藏设置,只能通过卸载程序(甚至是未运行的程序)来撤消。

I was having an issue with Last.fm that is very similar to yours, and I found that it was a software conflict.

The Last FM scrobbler application would not finish installing on my new build because it couldn't login or authenticate my username. I tried the regular scrobbler application and then tried the beta desktop program on Windows 7 64 bit. I suspected Skype or TeamViewer, but even after stopping or exiting those programs, neither versions of the installation would log in to the services.

  • The beta desktop application actually authenticated on 127.0.0.1 (random port) through my internet browser, but my browser would time out trying to send data over the port.
  • I checked and edited my HOSTS file in Windows, but that didn't fix the issue either.
  • Pinging 127.0.0.1 worked, but pinging any variation of the port would time out.

Finally, I decided to uninstall the Windows 7 Firewall Control program made by Sphinx Software. Mind you, I had set the firewall to be disabled at start up (clean start-up - all startup programs disabled through MSConfig).

I made sure that the firewall program was not running at all in my services. However, after uninstalling the software, even without restarting my computer, 127.0.0.1 opened up on all ports and my Last.fm scrobbler finally connected and finished installation.

So, it may be a hidden setting that can only be undone by uninstalling programs (even programs that aren't running).

八巷 2024-10-06 22:17:19

对我来说 localhost 不是正确的地址。

输入 cmd“主机名”并将其用作 url。

命令->主机名

如果这不起作用,请尝试仅使用服务器(或计算机)的 IP 地址

For me localhost was not the correct address.

Type into cmd "hostname" and use that as the url.

CMD -> hostname

If that doesn't work try just the ip address of the server (or computer)

半夏半凉 2024-10-06 22:17:19

我将网站文件夹存储在 xamp/htdocs (Windows 机器)中。然后我在XAMP控制面板上启动了apache。当我调用 http://localhost/mysite/index.html 时,我的页面呈现成功。

我希望这有帮助。

I stored my website folder in xamp/htdocs (windows machine). Then I started apache on the XAMP control panel. My pages rendered successfully when I called http://localhost/mysite/index.html.

I hope this is helpful.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文