Stephen Nimmo

23Dec/094

Ubuntu 9.10 – Apache2 + Tomcat6


Warning: file_get_contents(http://feeds.delicious.com/v2/json/urlinfo/data?url=http%3A%2F%2Fstephennimmo.com%2Fblog%2F2009%2F12%2F23%2Fubuntu-9-10-apache2-tomcat6%2F) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 999 Unable to process request at this time -- error 999 in /home1/stephenn/public_html/blog/wp-content/plugins/digg-digg/dd.class.php on line 866

1) sudo apt-get install apache2 tomcat6 libapache2-mod-jk
2) sudo vim /etc/apache2/workers.properties
and type/past in:
# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009

3) sudo vim /etc/apache2/apache2.conf
and type/past in:
# Load mod_jk module
# Update this path to match your modules location
LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
# Declare the module for (remove this line on Apache 2.x)
#AddModule mod_jk.c
# Where to find workers.properties
# Update this path to match your conf directory location (put workers.properties next to httpd.conf)
JkWorkersFile /etc/apache2/workers.properties
# Where to put jk shared memory
# Update this path to match your local state directory or logs directory
JkShmFile /var/log/apache2/mod_jk.shm
# Where to put jk logs
# Update this path to match your logs directory location (put mod_jk.log next to access_log)
JkLogFile /var/log/apache2/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the timestamp log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

6) sudo vim /etc/apache2/sites-enabled/000-default
Delete "DocumentRoot /var/www"
And type in
JkMount / worker1
JkMount /* worker1
note, you can use JkUnMount to define directories you want apache to serve

7) Enable port 8009 on tomcat
sudo vim /etc/tomcat6/server.xml
remove the "" that is a line below

8) restart tomcat
sudo /etc/init.d/tomcat6 restart

9) restart apache
sudo /etc/init.d/apache2 restart

10) wget localhost
You should see the default tomcat page

Courtesy of: http://rcpeters.blogspot.com/2009/05/installing-apache2-and-tomcat6-on.html

Comments (4) Trackbacks (0)
  1. At last, I could find your article again. You have few useful tips for my school project. Now, I won’t forget to bookmark it. :)

  2. very good, simple and efficient

    tks

  3. BEST TUTORIAL ON THE INTERNET!

    Regards,
    Ravi.

  4. When I change jkMount to other than / or /* I get the following error:
    Not Found

    The requested URL / was not found on this server.


Leave a comment


No trackbacks yet.