mod_jk连接器集成

时间:2015-10-08 00:26:30

标签: apache tomcat mod-jk

CentOS版本6.7(最终版)     \ m

上的内核\ r \ n
apache-tomcat-7.0.47  
jdk1.7.0_45

tomcat-connectors-1.2.41

log显示mod_jk已初始化:

# cat /var/log/httpd/mod_jk.log
[Wed Oct 07 19:19:31.070 2015] [32013:140147690502112] [info] init_jk::mod_jk.c (3591): mod_jk/1.2.41 initialized
[Wed Oct 07 19:19:31.101 2015] [32014:140147690502112] [info] init_jk::mod_jk.c (3591): mod_jk/1.2.41 initialized

但没有将请求转发给tomcat。这是我的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 emerg

#NameVirtualHost 
<VirtualHost 159.255.145.155:80>
    ServerName localhost
    JkMount /manager ajp13
    JkMount /manager/* ajp13
    JkMount /docs ajp13
    JkMount /docs/* ajp13
    JkMount /examples ajp13
    JkMount /examples/* ajp13
    JkMount /host-manager ajp13
    JkMount /host-manager/* ajp13
    JkMount /servlet/* ajp13
    JkMount /*.jsp ajp13
</VirtualHost>

这是我的workers.properties文件:

workers.tomcat_home=/var/java/apache-tomcat-7.0.47
workers.java_home=/var/java/jdk1.7.0_45
ps=/
worker.list=ajp13
worker.default.port=8009
worker.default.host=localhost
worker.default.type=ajp13
worker.default.lbfactor=1

请告知

感谢您的期待

1 个答案:

答案 0 :(得分:0)

# vi /var/www/vhosts/system/domainName.com/conf/vhost.conf
JkMount /servlet/* ajp13
JkMount /*.jsp ajp13

Then run:
/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain domainName.com