Hi,
I am currently running Apache 2.0.52 and JBoss 4.2.2 in my environment. I have
built mod-jk 1.2.26. I have configured
Apache as prescribed to call
mod-jk.conf (see below). My intent is to have Apache serve all static content
and have
the specific uri's specified in the map to use Jboss.
However, the uri maps are not being detected. This
is what I get in the mod-jk logs:
If I change my Virtual Host and place my
domain name instead of '*', all requests, even for static content, get
redirected
to mod-jk:
[Wed May 07
21:34:34 2008][18127:2537034048]
[debug]
map_uri_to_worker::jk_uri_worker_map.c (682): Attempting to map URI
'/index.html' from 1 maps
[Wed May 07 21:34:34 2008][18127:2537034048]
[debug]
find_match::jk_uri_worker_map.c (503): Attempting to map context URI
'/jkstatus/=status' source 'JkMount'
[Wed May 07 21:34:34
2008][18127:2537034048] [debug]
jk_map_to_storage::mod_jk.c (3211): no match
for /index.html found
Any idea what the problem could be? Below is my
configuration. Thank you.
Extract from httpd.conf:
# Virtual
hosts
#
# Virtual host Default Virtual
Host
<VirtualHost *>
JkMountFile
/etc/httpd/conf/uriworkermap.properties
ServerSignature email
DirectoryIndex index.html index.php index.htm
index.shtml
DocumentRoot
"/var/www/html"
HostNameLookups
off
</VirtualHost>
# Virtual host Virtual Host 0
<VirtualHost
>
ServerAdmin webmaster@myhost.com ServerSignature
email
DirectoryIndex index.html
index.htm index.shtml
JkMountCopy
On
</VirtualHost>
<VirtualHost
*:443>
JkMountCopy
On
ServerAdmin webmaster@myhost.com ServerSignature
email
DirectoryIndex index.html
index.php index.htm index.shtml
HostNameLookups off
DocumentRoot
"/var/www/html"
</VirtualHost>
uriworkermap.properties:
# Mount the Servlet
context to the ajp13
worker
/jmx-console=loadbalancer
/jmx-console/*=loadbalancer
/jmx-console/=loadbalancer
/web-console=loadbalancer
/web-console/*=loadbalancer
/jboss=loadbalancer
/jboss/*=loadbalancer
/jkstatus=status
/jkstatus/=status
workers.properties:
worker.list=node1,loadbalancer,status
# Define Node1
# modify the host as your host IP
or DNS
name.
worker.node1.port=8009
worker.node1.host=www.myhost.com
worker.node1.type=ajp13
worker.node1.lbfactor=1
#
worker.node1.connection_pool_size=10 (1)
# Load-balancing
behaviour
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1
# Status worker for managing load
balancer
worker.status.type=status
mod-jk.conf:
# Where to find
workers.properties
JkWorkersFile conf/workers.properties
# Where to put jk logs
JkLogFile
logs/mod_jk.log
# You can use external file for mount points.
#
It will be checked for updates each 60 seconds.
# The format of the file is:
/url=worker
# /examples/*=loadbalancer
#JkMountFile
/etc/httpd/conf/uriworkermap.properties
# Set the jk log level
[debug/error/info]
JkLogLevel debug
# Select the log format
JkLogStampFormat "[%a %b
%d %H:%M:%S %Y]"
# JkRequestLogFormat
JkRequestLogFormat "%w %V
%T"
# Mount your applications
#JkMount
/__application__/* loadbalancer
#JkMount /jmx-console
loadbalancer
#JkMount /jmx-console/ loadbalancer
#JkMount
/jmx-console/* loadbalancer
#JkMount /jboss
loadbalancer
#JkMount /jboss/ loadbalancer
#JkMount /jboss/*
loadbalancer
#JkMount /jkstatus status
# Add shared memory.
# This directive is present
with 1.2.10 and
# later versions of mod_jk, and is needed for
# for load
balancing to work properly
# Note: Replaced JkShmFile logs/jk.shm due to
SELinux issues. Refer to
# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=225452JkShmFile run/jk.shm
# Add jkstatus for managing runtime
data
<Location /jkstatus/>
JkMount
status
Order deny,allow
Deny from all
Allow from
127.0.0.1
</Location>