From: Christophe Lemaire <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
To: tomcat-user@jakarta.apache.org
Subject: Apache as front-end for several tomcat
Date: Wed, 30 Mar 2005 22:12:27 +0200
Hello,
I would like to setup a Apache 2.0.53 as front-end for several Tomcat
5.0.19. I use JK1.2.8 as connector.
I have defined one worker per tomcat server. I use three name based virtual
hosts in the apache config.
The problem is only the first virtual host works. In the mod_jk.log, I can
see that every request sent to the apache are checked with the JkMount from
the first virtual host only.
Here are my config files :
-------------------- workers.properties -----------------------
worker.list=demo1,demo2,demo3,stat
worker.demo1.type=ajp13
worker.demo1.host=192.168.0.1
worker.demo1.port=8009
worker.demo2.type=ajp13
worker.demo2.host=192.168.0.2
worker.demo2.port=8009
worker.demo3.type=ajp13
worker.demo3.host=192.168.0.3
worker.demo3.port=8009
worker.stat.type=ajp13
worker.stat.host=192.168.0.3
worker.stat.port=7201
----------------- end of workers.properties -------------------
In the httpd.conf file, I include the file mod_jk.conf (no other virtual
hosts are defined in httpd.conf):
-------------------- mod_jk.conf -----------------------
# Load mod_jk module
LoadModule jk_module modules/mod_jk.so
# Where to find workers.properties
JkWorkersFile conf/workers.properties
# Where to put jk logs
JkLogFile logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel debug
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"
NameVirtualHost *:81
<VirtualHost *:81>
ServerName demo1.myweb.org
JkMount /*/tracking/* stat
JkMount /tracking/* stat
JkMount /web/* demo1
JkMount /ald/* demo1
JkMount /htmleditor/* demo1
JkMount /* demo1
</VirtualHost>
<VirtualHost *:81>
ServerName demo2.myweb.org
JkMount /*/tracking/* stat
JkMount /* demo2
</VirtualHost>
<VirtualHost *:81>
ServerName demo3.myweb.org
JkMount /*/tracking/* stat
JkMount /* demo3
</VirtualHost>
----------------- end of mod_jk.conf -------------------
Extract from mod_jk.log :
URL typed in the browser : http://demo3.myweb.org:81/
[Wed Mar 30 22:15:46 2005] [12762:8192] [debug]
map_uri_to_worker::jk_uri_worker_map.c (700): Attempting to map URI '/'
from 6 maps
[Wed Mar 30 22:15:46 2005] [12762:8192] [debug]
map_uri_to_worker::jk_uri_worker_map.c (718): Attempting to map context URI
'/*/tracking/*'
[Wed Mar 30 22:15:46 2005] [12762:8192] [debug]
map_uri_to_worker::jk_uri_worker_map.c (718): Attempting to map context URI
'/tracking/*'
[Wed Mar 30 22:15:46 2005] [12762:8192] [debug]
map_uri_to_worker::jk_uri_worker_map.c (718): Attempting to map context URI
'/web/*'
[Wed Mar 30 22:15:46 2005] [12762:8192] [debug]
map_uri_to_worker::jk_uri_worker_map.c (718): Attempting to map context URI
'/ald/*'
[Wed Mar 30 22:15:46 2005] [12762:8192] [debug]
map_uri_to_worker::jk_uri_worker_map.c (718): Attempting to map context URI
'/htmleditor/*'
[Wed Mar 30 22:15:46 2005] [12762:8192] [debug]
map_uri_to_worker::jk_uri_worker_map.c (718): Attempting to map context URI
'/*'
[Wed Mar 30 22:15:46 2005] [12762:8192] [debug]
map_uri_to_worker::jk_uri_worker_map.c (755): Found a context match demo1
-> /
[Wed Mar 30 22:15:46 2005] [12762:8192] [debug] jk_handler::mod_jk.c
(1715): Into handler jakarta-servlet worker=demo1 r->proxyreq=0
[Wed Mar 30 22:15:46 2005] [12762:8192] [debug]
wc_get_worker_for_name::jk_worker.c (92): found a worker demo1
[Wed Mar 30 22:15:46 2005] [12762:8192] [debug] init_ws_service::mod_jk.c
(479): agsp=81 agsn=demo3.myweb.org hostn=demo3.myweb.org
shostn=demo1.myweb.org cbsport=0 sport=0 claport=81
But I get the homepage of demo1.myweb.org...
Any idea why this happen?
Thanks in advance,
Christophe
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]