Why switching from mod_proxy_http to mod_jk prevents connection to Tomcat?

41 views Asked by At

I have the HTTP Apache server that is connected to Tomcat either by mod_jk or mod_proxy_http. So far, the connection by mod_proxy_http works fine but the connection by mod_jk results in the not finding the path error, for example:

The requested URL /cm/login.ep was not found on this server.

The corresponding error in the apache error_log is:

[Sat May 24 22:19:47 2014] [error] [client 127.0.0.1] File does not exist: /Library/WebServer/Documents/cm

The VirtualHost definition is not used in httpd.conf.

mod_jk.log does not show any errors, the worker is found from the workers.properties file. The log says:

[Fri May 23 17:19:25 2014] [758:140735273992976] [info] init_jk::mod_jk.c (3383): mod_jk/1.2.40 initialized

The connection configurations for mod_proxy_http and mod_jk are below:

Here are the mod_proxy_http settings:

ProxyPass /webservices                ajp://localhost:8009/webservices
ProxyPass /engine                     ajp://localhost:8009/engine
ProxyPass /cmserver                   ajp://localhost:8009/cmserver
ProxyPass /searchserver               ajp://localhost:8009/searchserver
ProxyPass /dwr                        ajp://localhost:8009/dwr
ProxyPass /rss                        ajp://localhost:8009/rss
ProxyPass /rest                       ajp://localhost:8009/rest
ProxyPass /pr                         ajp://localhost:8009/pr
ProxyPass /template-resources         ajp://localhost:8009/template-resources
ProxyPassMatch (/.*\.ep)              ajp://localhost:8009/$1
ProxyPassMatch ^(/.*\.image)          ajp://localhost:8009/$i
ProxyPassMatch /assets                ajp://localhost:8009/assets
ProxyPassMatch ^(/.*_d_.*\.html)      ajp://localhost:8009/$1
ProxyPassMatch ^(/.*_prod_.*\.html)   ajp://localhost:8009/$1
ProxyPassMatch ^(/.*\.json)           ajp://localhost:8009/$1

Here are the mod_jk settings:

JkMount  /webservices/*       a6
JkMount  /engine              a6
JkMount  /cmserver/*          a6
JkMount  /searchserver/*      a6
JkMount  /dwr/*               a6
JkMount  /rss                 a6
JkMount  /rest/*              a6
JkMount  /pr                  a6
JkMount  /template-resources* a6
JkMount  /*.ep                a6
JkMount  /*.image             a6
JkMount  /assets/*            a6
JkMount  /*_d_*.html          a6
JkMount  /*_prod_*.html       a6
JkMount  /*_attr_*.html       a6
JkMount  /*_pkg_*.html        a6
JkMount  /*_ptd_*.html        a6
JkMount  /*_ptattr_*.html     a6
JkMount  /*_ptpkg_*.html      a6
JkMount  /*_static_*.html     a6
JkMount  /*_attr_*.html       a6
JkMount  /*.json              a6
JkMount  /order/*             a6

And the workers.properties are:

worker.list=status,a6
# Worker for a6 webapps
worker.a6.port=8009
worker.a6.host=localhost
worker.a6.type=ajp13

# Status worker for managing load balancer
worker.status.type=status
0

There are 0 answers