如何在同一 IP 地址(不同端口)上运行 Apache 和 IIS 7?

如何在同一 IP 地址(不同端口)上运行 Apache 和 IIS 7?

我有一台 Windows Server 2008 计算机,目前正在运行 Apache,用于面向公众的 PHP 站点(端口 80)。IIS 已停止。

我现在需要在与 Apache 相同的 IP 地址上开始运行 IIS,但我可以愉快地使用另一个端口,因为它仅是内部端口,例如 8080。我们没有其他可用的 IP 地址。

我认为这是可以做到的,但我是 Apache 的新手,需要确保在启动 IIS 时不会破坏当前的 PHP 站点。我了解 IIS 默认倾向于占用 IP 上的所有端口?还是自 IIS 6 以来情况有所改变?

我需要采取哪些配置步骤来实现这一点?

非常感谢,蒂姆

答案1

IIS7 的步骤包括:

Microsoft Internet 信息服务 7.0:

1. Open Internet Information Services (IIS) Manager.
2. Select the Web site that you wish to configure.
3. In the Action pane, click Bindings.
4. Click Add to add a new site binding, or click Edit to change an existing binding.
5. Click OK to apply the changes.

如何更改 IIS 服务的 TCP 端口

答案2

或者你可以对 Apache 尝试这个:绑定到地址和端口

简短版本修改该listen行:

<ipaddress>:<port>

相关内容