Hi Giys - Ive been trying to implement modjk with tomcat 6 and aapache 2.2.3 and it seems like ive followed everything correctly but cannot seem to get it working. Can you spot my error?
I have done the following:
1. downloaded and compiled the mod_jk.so file from source and places in /usr/lib/httpd/modules/mod_jk.so
2. included this in the httpd.conf file and set my workers.properties file as follows:
Include /opt/tomcat/conf/auto/mod_jk.conf
# Where to find workers.properties
JkWorkersFile /etc/httpd/conf/workers.properties
# Where to put jk logs
JkLogFile /var/log/httpd/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"
3. wrokers.properties is as follows:
workers.tomcat_home=/opt/tomcat
workers.java_home=/usr/java/jdk1.6.0_14/
worker.list=ajp13
ps=/
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
4. I included the following in the virtual host tag of httpd.conf
<VirtualHost ip address here:80>
ServerName gnsol.net
ServerAlias
www.gnsol.net
ServerAlias webmail.gnsol.net
ServerAlias admin.gnsol.net
<IfModule mod_jk.c>
# The followingV line makes apache aware of the location of
# the /examples context
Alias /gnsol "/opt/tomcat/webapps/gnsol"
<Directory "/opt/tomcat/webapps/gnsol">
Options Indexes FollowSymLinks
Allow from All
</Directory>
# Mounted stuff goes via tomcat (ajp13)
JkMount /gnsol/* ajp13
# You can explicitly unmount part of the mounted tree
# Unmounted stuff goes via apache.
# Serve html, jpg and gif using httpd
JkUnMount /gnsol/*.html ajp13
JkUnMount /gnsol/*.jpg ajp13
JkUnMount /gnsol/*.gif ajp13
# The following line prohibits users from directly accessing WEB-INF
<Location "/gnsol/WEB-INF/">
AllowOverride None
Deny from All
</Location>
</IfModule>
#JkMount /gnsol ajp13
#JkMount /gnsol/* ajp13
#DocumentRoot /home/gnsol/public_html
#ErrorLog /var/log/virtualmin/gnsol.net_error_log
#CustomLog /var/log/virtualmin/gnsol.net_access_log combined
#ScriptAlias /cgi-bin/ /home/gnsol/cgi-bin/
#DirectoryIndex index.html index.htm index.php index.php4 index.php5
#<Directory /home/gnsol/public_html>
#Options -Indexes IncludesNOEXEC FollowSymLinks
#allow from all
#AllowOverride All
#</Directory>
#<Directory /home/gnsol/cgi-bin>
#allow from all
#</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.gnsol.net
RewriteRule ^(.*)
http://gnsol.net:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.gnsol.net
RewriteRule ^(.*)
http://gnsol.net:10000/ [R]
</VirtualHost>
5. We are also trying to get the jsp examples going by entering
# Send servlet for context / examples to worker named worker1
JkMount /examples ajp13
# Send JSPs for context /examples/* to worker named worker1
JkMount /examples/* ajp13
Which didnt work either.
6. I have feeling it maay be something with the server.xml file we are using. The server.xml does have thee following 2 lines in it though:
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
we also added this:
<Listener className="org.apache.jk.config.ApacheConfig" modJk="/usr/lib/httpd/modules/mod_jk.so"/>
Yet still nothing runs.
Were is the error?