Apache (xamp) 和 IIS 不能一起工作

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/431041/
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-09-13 17:07:11  来源:igfitidea点击:

Apache (xamp) and IIS cannot work together

apacheiisapache2xampp

提问by user46795

I have XAMP 1.6.8 and IIS 5.0 installed on my PC(Windows XP SP3).

我的 PC(Windows XP SP3)上安装了 XAMP 1.6.8 和 IIS 5.0。

I'm unable to run them simultaneously. If IIS service is running, Apache throws the following error:

我无法同时运行它们。如果 IIS 服务正在运行,Apache 会抛出以下错误:

(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...

(OS 10048) 通常每个套接字地址(协议/网络地址/端口)只允许使用一次。: make_sock: 无法绑定到地址 0.0.0.0:80 没有可用的侦听套接字,正在关闭 无法打开日志 注意上面的错误或消息,然后按 键退出。24...

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

Windows 无法在本地计算机上启动 Apache2。有关详细信息,请查看系统事件日志。如果这是非 Microsoft 服务,请联系服务供应商,并参考特定于服务的错误代码 1。



Edit:

编辑:

Apache runs on a different port 3128. And IIS (asp.net) usually runs on a different port.

Apache 在不同的端口 3128 上运行。而 IIS (asp.net) 通常在不同的端口上运行。

回答by Ed Guiness

You need to configure either Apache or IIS to listen on a different port.

您需要配置 Apache 或 IIS 以侦听不同的端口。

You can also use tcpviewto check which ports are in use by which applications since it sounds like you have a conflict.

您还可以使用tcpview来检查哪些应用程序正在使用哪些端口,因为听起来您有冲突。

回答by gbjbaanb

"could not bind to address 0.0.0.0:80" means that, when it starts up, it tries to bind to port 80 on all available network interfaces. As IIS already has hogged one (or more) IPs to bind to, apache cannot get any and so will fail.

“无法绑定到地址 0.0.0.0:80”意味着,当它启动时,它会尝试绑定到所有可用网络接口上的端口 80。由于 IIS 已经占用了一个(或多个)要绑定的 IP,因此 apache 无法获得任何 IP,因此会失败。

(I'm not sure if it will bind to any available IPs if you've configured it to bind to all, but one is already taken.)

(如果您将其配置为绑定到所有 IP,我不确定它是否会绑定到任何可用的 IP,但已经使用了一个。)

So, configure Apache to bind to a different port (if you only have 1 IP address), or to bind to a different IP or range of IPs.

因此,将 Apache 配置为绑定到不同的端口(如果您只有 1 个 IP 地址),或者绑定到不同的 IP 或 IP 范围。

You do this by changing the binding. First find the Listen directive in the configuration file (httpd.conf) and change it. Currently it will say "Listen 80"(meaning all IPs), change it to say "Listen 192.168.0.2:80" to make it bind to that specified IP address.

您可以通过更改绑定来做到这一点。首先在配置文件(httpd.conf)中找到Listen指令并修改。目前它会说"Listen 80"(意味着所有 IP),将其更改为“ Listen 192.168.0.2:80”以使其绑定到指定的 IP 地址。

You may have to edit the IIS configuration too to tell it to only bind to a single IP address too.

您可能还必须编辑 IIS 配置以告诉它也只绑定到单个 IP 地址。

回答by Mohammed Rafeeq

If you cant hit the arrow in centre of the circle, hit the arrow and then draw a circle around it. - I tried everything advised, uninstalled skype, no IIS running,added apache program to antivirus, still this did not solve the program

如果你不能击中圆圈中心的箭头,请击中箭头,然后在它周围画一个圆圈。- 我尝试了所有建议的方法,卸载了 Skype,没有运行 IIS,将 apache 程序添加到防病毒软件中,仍然没有解决该程序

finally i changed apaches port from 80 to 82 look for Listen 80 in the httpd.conf and change this

最后我将 apaches 端口从 80 更改为 82 在 httpd.conf 中查找 Listen 80 并更改此