Hi
I have a strange problem related to the mod_jk module on OpenSuse 11.2. X64.
I have apache2 (of the distribution) working stanad alone. With standard installation dir.
I have tomcat6 (of the distribution) working stand alone. With standard installation dir.
IN ADDITION I HAVE:
Netbeans 6.5 with Tomcat 6.0.18 under /usr/local/Netbeans6.5rc2 & /usr/local/apache-tomcat-8.0.18 which is not active while tomcat6 is running. If I want to develop with Netbeans I stop tomcat6, & start tomcat from Netbeans (thus running the development version of tomcat) & it works fine. HOWEVER - the tomcat installations share webapps directory, implemented as a softlink: /usr/share/tomcat6/webapps -> /usr/local/apache-tomcat-6.0.18/webapps.
I have discovered that the documentation on mod_jk is for tomcat5 & that is not working at all.
This is where I am at…
I have the mod_jk working from local host (on some of the webapplications), but not from remote browsers. However the directory listing on each application (that runs on localhost fine) shows up from remote browsers
TOMCAT
I have these two files in tomcat (/usr/share/tomcat6/)conf/jk directory: mod_jk.conf & workers.properties
I have these two lines in server.xml
<Connector port=“8009” protocol=“AJP/1.3” redirectPort=“8443” />
<Listener className=“org.apache.jk.config.ApacheConfig” append=“true” jkWorker=“ajp13” />
These lines enable the tomcat to write a file conf/auto/mod_jk.conf on startup (which have to be accesable to everybody or the tomcat will not start).
APACHE
All my local additions to httpd is done in a file /etc/apache2/httpd.conf.local which is included by httpd.conf. Easy.
httpd.conf.local has these three lines:
Include /usr/share/tomcat6/conf/jk/mod_jk.conf
Include /usr/share/tomcat6/conf/auto/mod_jk.conf
JkShmFile /tmp/apache2.shm
The conf/jk/mod_jk.conf has this content:
simple configuration for apache (for AJP connector, modul mod_jk.so)
<IfModule mod_jk.c>
JkWorkersFile /usr/share/tomcat6/conf/jk/workers.properties
JkLogFile /var/log/tomcat6/mod_jk.log
# Log level to be used by mod_jk
JkLogLevel error
# The following line makes apache aware of the location of
# the /servlet-examples context
Alias /examples "/srv/tomcat6/webapps/examples"
<Directory "/srv/tomcat6/webapps/examples">
Options Indexes FollowSymLinks
allow from all
</Directory>
# The following line makes apache aware of the location of
# the /manager context
Alias /manager "/srv/tomcat6/webapps/manager"
<Directory "/srv/tomcat6/webapps/manager">
Options All
allow from all
</Directory>
# The following line makes apache aware of the location of
# the /MyApp context
Alias /Myapp "/srv/tomcat6/webapps/MyApp"
<Directory "/srv/tomcat6/webapps/MyApp">
Options Indexes FollowSymLinks
allow from all
</Directory>
<Location "/srv/tomcat6/webapps/MyApp/WEB-INF/">
AllowOverride None
deny from all
</Location>
</IfModule>
The auto/mod_jk.conf (written by tomcat) has this content:
########## Auto generated on Sun Dec 13 11:12:58 CET 2009##########
<IfModule !mod_jk.c>
LoadModule jk_module “/usr/lib64/apache2/mod_jk.so”
</IfModule>
<VirtualHost localhost>
ServerName localhost
JkMount /manager ajp13
JkMount /manager/* ajp13
JkMount /docs ajp13
JkMount /docs/* ajp13
JkMount /examples ajp13
JkMount /examples/* ajp13
JkMount /MyApp ajp13
JkMount /MyApp/* ajp13
JkMount /host-manager ajp13
JkMount /host-manager/* ajp13
</VirtualHost>
Content of the workers.properties file:
Add ‘inprocess’ if you want JNI connector
worker.list=ajp12, ajp13
, inprocess
#------ DEFAULT ajp12 WORKER DEFINITION ------------------------------
#---------------------------------------------------------------------
Defining a worker named ajp12 and of type ajp12
Note that the name and the type do not have to match.
worker.ajp12.port=8007
worker.ajp12.host=localhost
worker.ajp12.type=ajp12
Specifies the load balance factor when used with
a load balancing worker.
Note:
----> lbfactor must be > 0
----> Low lbfactor means less work done by the worker.
worker.ajp12.lbfactor=1
#------ DEFAULT ajp13 WORKER DEFINITION ------------------------------
#---------------------------------------------------------------------
Defining a worker named ajp13 and of type ajp13
Note that the name and the type do not have to match.
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
Specifies the load balance factor when used with
a load balancing worker.
Note:
----> lbfactor must be > 0
----> Low lbfactor means less work done by the worker.
worker.ajp13.lbfactor=1
Any idea on what is going on here? Really need to get this working in a safe manner.
Kind Regards
Oddvard Myrnes