我在Plesk 11.x中使用Centos,这篇文章How to obtain Apache mod_jk connector for for RHL?帮助我安装了mod-jk,但接下来是什么。我的意思是我该如何将其与Tomcat集成,因为安装不足以使其启动。
有人可以帮助我吗?
问候
最佳答案
安装后,您需要:
创建worker.properties文件
mod-jk配置文件
Catalina_Home / conf / server.xml文件中的更改
设置域名conf / vhost.conf
在Plesk情况下重新配置httpdmng
这里如何做这些:
# vi /etc/httpd/conf/workers.properties
worker.list=worker1
# Define Node1
worker.worker1.port=8009
worker.worker1.host=localhost
worker.worker1.type=ajp13
worker.worker1.lbfactor=1
#vi /etc/httpd/conf.d/mod_jk.conf
<IfModule !mod_jk.c>
LoadModule jk_module "/usr/lib64/httpd/modules/mod_jk.so"
</IfModule>
JkWorkersFile "/etc/httpd/conf/workers.properties"
JkLogFile "/var/log/httpd/mod_jk.log"
JkLogLevel info
#NameVirtualHost IP:7080
<VirtualHost yourServerIP:7080>
ServerName localhost
JkMount /manager worker1
JkMount /manager/* worker1
JkMount /docs worker1
JkMount /docs/* worker1
JkMount /examples worker1
JkMount /examples/* worker1
JkMount /host-manager worker1
JkMount /host-manager/* worker1
JkMount /servlet/* worker1
JkMount /*.jsp worker1
</VirtualHost>
# vi /var/www/vhosts/system/yourDomain.com/conf/vhost.conf
JkMount /servlet/* worker1
JkMount /*.jsp worker1
Then run:
/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain yourDomain.com
mod_jk in $CATALINA_HOM/conf/ server.xml:
<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-->
change this with:
<Engine name="Catalina" defaultHost="localhost" jvmRoute="worker1">
让我知道您是否遇到任何问题
问候
关于apache - Centos与Plesk11.x,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/33551523/