我在 3 个 Tomcat 实例中部署了 3 个应用程序
http://host:8080/app0
http://host:8081/app1
http://host:8082/app2
我有workers.properties
worker.list=worker1,worker2,worker3
# Set properties for worker 'example' (ajp13)
worker.worker1.host=host
worker.worker1.port=8009
worker.worker1.type=ajp13
# Set properties for worker 'example' (ajp13)
worker.worker2.host=host
worker.worker2.port=8019
worker.worker2.type=ajp13
# Set properties for worker 'example' (ajp13)
worker.worker3.host=host
worker.worker3.port=8029
worker.worker3.type=ajp13
我的 httpd.conf 应该是什么样子?所有虚拟主机都可以具有相同的服务器名称,如下所示
# app0 instance virtual host
<VirtualHost *:80>
ServerName host
DocumentRoot TOMCAT_HOME"\Tomcat Instance 1\webapps"
ErrorLog logs/app0.log
JkMount /app0 worker1
</VirtualHost>
# app1 instance virtual host
<VirtualHost *:80>
ServerName host
DocumentRoot TOMCAT_HOME"\Tomcat Instance 2\webapps"
ErrorLog logs/app1.log
JkMount /app1 worker2
</VirtualHost>
# app2 instance virtual host
<VirtualHost *:80>
ServerName host
DocumentRoot TOMCAT_HOME"\Tomcat Instance 2\webapps"
ErrorLog logs/app2.log
JkMount /app2 worker3
</VirtualHost>
谁能帮我?如果我使用 mod 代理,我会间歇性地收到 502 代理错误,所以考虑使用 mod jk。