Centos With Plesk11.x

核能气质少年 提交于 2019-12-20 05:53:18

问题


I am using Centos with Plesk 11.x and this post How to obtain Apache mod_jk connector for for RHL? helped me to install mod-jk but what's next. I mean how can I integrate it with Tomcat as installation is not enough to bring it up.

Is anybody can help me?

Regards


回答1:


After installation you need to:

  1. create workers.properties file
  2. mod-jk config file
  3. Changes in Catalina_Home/conf/server.xml file
  4. setting domain name conf/vhost.conf
  5. Reconfiguration of httpdmng in case of Plesk

Here how to do these:

# 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">

Let me know if you face any problem

Regards



来源:https://stackoverflow.com/questions/33551523/centos-with-plesk11-x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!