[opencms-dev] HowTo: Apache2-Tomcat5-OpenCMS Integration on SLES9 with stable jk connector

kaffamanesh at dmu-world.de kaffamanesh at dmu-world.de
Tue Nov 30 18:42:01 CET 2004


perhaps somebody could find it useful.

HowTo: Apache2-Tomcat5-OpenCMS Integration on SLES9 with stable jk
connector:

http://www.pomegranate.de:90/cms/forum/viewthread?thread=7

or directly here:

HowTo Apache 2.0.52 - Tomcat 5.0.19 Integration on SuSE Linux Enterprise
Server 9 (SLES 9.1) with opencms

I assume you have installed OpenCms (or any othe application) on SLES9
under /srv/www/tomcat/demoserver/webapps/opencms/.

To enable apache to talk correctly with opencms servlet do the
following:

1. enable mod_jk.so module by editing /etc/sysconfig/apache2:
a) search for APACHE_MODULES and add "jk" to the list of modules
b) run SuSEconfig --module apache2
c) test if jk is loaded in /etc/apache2/sysconfig.d/loadmodule.conf

2. create jk.conf

a) touch /etc/apache2/conf.d/jk.conf

copy and paste the following to jk.conf

b) vi /etc/apache2/conf.d/jk.conf

--- start /etc/apache2/conf.d ---

<IfModule mod_jk.c>

JkWorkersFile "/etc/tomcat/demoserver/workers.properties"
JkLogFile "/var/log/tomcat/demoserver/mod_jk.log"

# Log level to be used by mod_jk
JkLogLevel error

JkMount /servlet/* ajp13
JkMount /*.jsp ajp13
JkMount /opencms/* ajp13


# The following line makes apache aware of the location of
# the /servlets-examples context
Alias /servlets-examples
"/srv/www/tomcat/demoserver/webapps/servlets-examples"
<Directory "/srv/www/tomcat/demoserver/webapps/servlets-examples">
Options Indexes FollowSymLinks
allow from all
</Directory>


# The following line makes apache aware of the location of
# the /jsp-examples context
Alias /jsp-examples "/srv/www/tomcat/demoserver/webapps/jsp-examples"
<Directory "/srv/www/tomcat/demoserver/webapps/jsp-examples">
Options Indexes FollowSymLinks
allow from all
</Directory>

Alias /opencms "/srv/www/tomcat/demoserver/webapps/opencms"
<Directory "/srv/www/tomcat/demoserver/webapps/opencms">
Options Indexes FollowSymLinks
allow from all
</Directory>

# The following line mounts all JSP files and the /servlet/ uri to
tomcat
# that didn't work, set it on top :-)
#JkMount /servlets-examples/servlet/* ajp13
#JkMount /jsp-examples/*.jsp ajp13
#JkMount /opencms/* ajp13

# The following line prohibits users from directly accessing WEB-INF
<Location "/jsp-examples/WEB-INF/">
AllowOverride None
deny from all
</Location>
AllowOverride None
deny from all
</Location>
<Location "/opencms/WEB-INF/">
AllowOverride None
deny from all
</Location>


</IfModule>

--- end /etc/apache2/conf.d/jk.conf ---

3. edit /etc/tomcat/demoserver/web.xml

uncomment the invoker servlet and its mapping, which was commented

4. rctomcat stop 
and Change CATALINA_BASE to "/srv/www/tomcat/demoserver" by editing the
file
/etc/sysconfig/j2ee

5. rctomcat start

6. rcapache2 restart

7. browse http://localhost/opencms/opencms

feel free to contact me if you have had troubles with this configuration
guide.



More information about the opencms-dev mailing list