我有一个因特网IP地址。
我有两个物理网络服务器。
1视窗IIS7托管3个网站。主机头名称在IIS7中配置。在我添加以下内容之前,这是正常的:
1 Linux (Ubuntu清醒) Apache2托管1个网站。VirtualHost是用Apache2配置的。我遵循了这些步骤:http://ubuntu-tutorials.com/2008/01/09/setting-up-name-based-virtual-hosting/
这两个服务器似乎在玩“拔河之战”。这是一个错误的配置,还是问题应该发生在这种设置?
发布于 2011-03-14 10:11:11
一种可能的解决方案是将外部IP地址提供给Ubuntu系统,并使用它的Apache为IIS7服务器反向代理。
在例如/etc/apache2/sites-avilable/iisproxyhosts中为IIS服务器上的每个主机创建一个虚拟主机
<VirtualHost *:80>
ServerName IIS.Domain1.TLD
ProxyRequests Off
<Proxy *>
Order deny,allow
allow from all
</Proxy>
ProxyPreserveHost On
ProxyPass / http://AddressOfIIServer/
ProxyPassReverse / http://AddressOfIIServer/
</VirtualHost>
<VirtualHost *:80>
ServerName IIS.Domain2.TLD
ProxyRequests Off
<Proxy *>
Order deny,allow
allow from all
</Proxy>
ProxyPreserveHost On
ProxyPass / http://AddressOfIIServer/
ProxyPassReverse / http://AddressOfIIServer/
</VirtualHost>
<VirtualHost *:80>
ServerName IIS.Domain3.TLD
ProxyRequests Off
<Proxy *>
Order deny,allow
allow from all
</Proxy>
ProxyPreserveHost On
ProxyPass / http://AddressOfIIServer/
ProxyPassReverse / http://AddressOfIIServer/
</VirtualHost>启用代理
a2enmod proxy_http
a2enmod proxy启用iisproxyhost并重新启动apache
a2ensite iisproxyhosts
/etc/init.d/apache2 reload发布于 2011-03-14 03:14:49
只有当所有虚拟主机运行在同一个web服务器实例上时,基于名称的虚拟主机才能工作。在这种情况下,您将需要使用NAT来获取网络上的两台计算机,并将NAT框配置为将连接转发到一个非标准端口到其中一个框,或者安排一个web服务器为另一个服务器代理(然后基于名称的虚拟托管将有助于调用代理)。或者买另一个IP地址。
发布于 2011-03-14 03:26:51
Microsoft TMG Server作为这两台服务器前面的防火墙,可以在一个公共IP地址上承载多个web URL,并使用NAT对背后的多个主机“反向代理”。“简单的解决办法是获得另一个公共IP,就像@geekosaur说的那样。”
https://serverfault.com/questions/247022
复制相似问题