Apache和IIS并排Windows2003上侧(包括监听端口80) [英] Apache and IIS side by side (both listening to port 80) on windows2003

查看:150
本文介绍了Apache和IIS并排Windows2003上侧(包括监听端口80)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么好的方法可以做到这一点?它甚至有可能做干净?

What are some good ways to do this? Is it even possible to do cleanly?

理想我想使用数据包报头,以决定哪个服务器处理请求。但是,如果有一个更简单/更好的方式让我知道。

Ideally I'd like to use packet headers to decide which server should handle requests. However, if there is an easier/better way let me know.

推荐答案

这是不可能的两个服务器在同一IP地址在同一端口上侦听:因为一个插座只能由一个进程打开,只有第一服务器被配置为在一定的IP /端口组合将成功地结合,而第二个将失败。

It's impossible for both servers to listen on the same port at the same IP address: since a single socket can only be opened by a single process, only the first server configured for a certain IP/port combination will successfully bind, and the second one will fail.

您将因此需要一种解决方法,以达到你想要的东西。最简单的可能是你的主IP /端口组合运行Apache,并且使用的 mod_rewrite的

You will thus need a workaround to achieve what you want. Easiest is probably to run Apache on your primary IP/port combination, and have it route requests for IIS (which should be configured for a different IP and/or port) to it using mod_rewrite.

请,替代IP和端口的IIS上运行应可达连接到服务器的客户端:如果你只有一个IP地址可用,你应该小心选择一个IIS端口不是一般防火墙阻挡的(8080可能是一个不错的选择,还是443,即使你正在运行普通的HTTP和SSL不)

Keep in mind that the alternative IP and port IIS runs on should be reachable to the clients connecting to your server: if you only have a single IP address available, you should take care to pick an IIS port that isn't generally blocked by firewalls (8080 might be a good option, or 443, even though you're running regular HTTP and not SSL)

P.S。另外,请注意,您确实需要修改使用httpcfg IIS的默认配置才允许其他服务器在同一服务器上的任何IP地址的端口80上运行:见米基·麦奎德的答案做到这一点的方法...

P.S. Also, please note that you do need to modify the IIS default configuration using httpcfg before it will allow other servers to run on port 80 on any IP address on the same server: see Micky McQuade's answer for the procedure to do that...

这篇关于Apache和IIS并排Windows2003上侧(包括监听端口80)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆