Windows 无法在本地计算机上启动 Apache2 - 问题

标签 windows windows-xp apache2

在安装 Apache2 的过程中,我在 cmd 窗口中收到以下消息:

Installing the Apache2.2 service The Apache2.2 service is successfully installed. Testing httpd.conf....

Errors reported here must be corrected before the service can be started. httpd.exe: Could not reliably determine the server's fully qualified domain name , using 192.168.1.3 for ServerName (OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs Note the errors or messages above, and press the key to exit. 24...

安装后一切看起来都很好,但事实并非如此。如果我尝试启动服务,我会收到以下消息:

Windows could not start the Apache2 on Local Computer. For more information, review the System Event Log. If this is a non-Micorsoft service, contact the service vendor, and refer to service-specific error code 1.

Apach2版本为2.2.9

有没有人有同样的问题,或者可以帮助我。

最佳答案

有一些其他程序在监听 80 端口,通常怀疑是

  1. Skype(监听端口 80)
  2. NOD32(将 Apache 添加到 IMON 异常(exception)列表以允许 Apache 绑定(bind))
  3. 其他一些杀毒软件(同上)

纠正它的方法是关闭正在使用端口 80 的程序或将其配置为使用不同的端口,或者使用 httpd.conf 中的 Listen 指令将 Apache 配置为在不同的端口上监听。在防病毒的情况下,将防病毒配置为允许 Apache 绑定(bind)到您选择的端口。

诊断哪个应用程序(如果有)已绑定(bind)到端口 80 的方法是使用这些选项运行 netstat,在本地 IP 地址(第二列)旁边查找 :80 并找到 PID(最后一列)。然后,在任务管理器上,您可以找到哪个进程具有您在上一步中获得的 PID。 (您可能需要在任务管理器上添加 PID 列)

C:\Users\vinko>netstat -ao -p tcp

Conexiones activas

  Proto  Dirección local          Dirección remota        Estado           PID
  TCP    127.0.0.1:1110         127.0.0.1:51373        TIME_WAIT       0
  TCP    127.0.0.1:1110         127.0.0.1:51379        TIME_WAIT       0
  TCP    127.0.0.1:1110         127.0.0.1:51381        ESTABLISHED     388
  TCP    127.0.0.1:1110         127.0.0.1:51382        TIME_WAIT       0
  TCP    127.0.0.1:1110         127.0.0.1:51479        TIME_WAIT       0
  TCP    127.0.0.1:1110         127.0.0.1:51481        TIME_WAIT       0
  TCP    127.0.0.1:1110         127.0.0.1:51483        TIME_WAIT       0
  TCP    127.0.0.1:1110         127.0.0.1:51485        ESTABLISHED     388
  TCP    127.0.0.1:1110         127.0.0.1:51487        TIME_WAIT       0
  TCP    127.0.0.1:1110         127.0.0.1:51489        ESTABLISHED     388
  TCP    127.0.0.1:51381        127.0.0.1:1110         ESTABLISHED     5168
  TCP    127.0.0.1:51485        127.0.0.1:1110         ESTABLISHED     5168
  TCP    127.0.0.1:51489        127.0.0.1:1110         ESTABLISHED     5168
  TCP    127.0.0.1:59264        127.0.0.1:59265        ESTABLISHED     5168
  TCP    127.0.0.1:59265        127.0.0.1:59264        ESTABLISHED     5168
  TCP    127.0.0.1:59268        127.0.0.1:59269        ESTABLISHED     5168
  TCP    127.0.0.1:59269        127.0.0.1:59268        ESTABLISHED     5168
  TCP    192.168.1.34:51278     192.168.1.33:445       ESTABLISHED     4
  TCP    192.168.1.34:51383     67.199.15.132:80       ESTABLISHED     388
  TCP    192.168.1.34:51486     66.102.9.18:80         ESTABLISHED     388
  TCP    192.168.1.34:51490     74.125.4.20:80         ESTABLISHED     388

如果您想禁用 Skype 监听端口 80 和 443,您可以点击链接 http://www.mydigitallife.info/disable-skype-from-using-opening-and-listening-on-port-80-and-443-on-local-computer/

关于Windows 无法在本地计算机上启动 Apache2 - 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/195641/

相关文章:

java - Runtime.getRuntime().exec() 和双击执行批处理文件有什么区别?

windows - 是什么原因导致 "The permissions on <folder> are incorrectly ordered"?

c - 使用 C 程序截取 Windows 桌面的屏幕截图。

c++ - 在 MSVC 2012 中为 Win XP 构建 C++ 项目

django - 多个 Django 站点,一台服务器

php - Ubuntu 14.04 服务器 : Apache2 issue with phpMyAdmin

angularjs - 未找到 Yeoman 指令模板

c# - LocalService 的 'Access is denied' 的解决方法

windows-xp - 如何禁用乌龟BZR?

linux - 'www-data' 不足配股