咨询热线:4006-75-4006
售前:9:00-23:30 备案:9:00-18:00 技术:7*24h
1. windows中用apache代理tomcat和iis,设置监听端口分别为:80,8080,88.
分别建立站点可用。
2. 修改服务配置.
http.conf中去掉注释:mod_proxy.so / mod_proxy_http.so / mod_proxy_ajp.so
server.xml设置ajp端口为8009(默认即可)
3. apache建立站点分别代理tomcat和iis:
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "E:/website/tomcat1.com"
ProxyPass /static !
ProxyPass /template !
ProxyPass / ajp://127.0.0.1:8009/
ProxyPassReverse / ajp://127.0.0.1:8009/
ServerName tomcat1.com
ServerAlias www.landui.com
ErrorLog "logs/tomcat1.com-error.log"
CustomLog "logs/tomcat1.com-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "E:/website/iis1.com"
ProxyPreserveHost On
ProxyPass / http://www.landui.com:88/
ProxyPassReverse / http://www.landui.com:88/
ServerName iis1.com
ServerAlias www.landui.com
ErrorLog "logs/iis1.com-error.log"
CustomLog "logs/iis1.com-access.log" common
</VirtualHost>
4. 测试用域名直接访问,不带端口.