Trying to get Apache and Tomcat set up together for the first time. I've used them separately with different projects before without problems, but now I've got to get things set up so all web pages are served through Apache.
I've downloaded mod_jk and been trying to follow the instructions on Apache's website for getting them working together but not having much luck. I think I'm just not understanding how to configure the URI mappings to point specific websites/files in Apache to Tomcat. I've got quite a few php websites set up with Virtual Hosting in Apache already and they're working fine. All my website data is in /var/www/ and I'd like to keep the sites requiring JSP in the same location instead of $TOMCAT_HOME/webapps.
I'm running Ubuntu 6.06 LTS Server and am using the Debian mod/conf file configuration they've adopted. My configuration files are below. I just copied the sample configuration files that came with the mod-jk source code and modified them for my site. Currently whenever I try and load a JSP page, I'm getting redirected to the Tomcat server properly, but I'm getting 404 errors saying the files don't exist when I know they do.
Any help getting me on the right track would be appreciated!
----------- mod-jk.conf: # Where to find workers.properties JkWorkersFile /etc/apache2/mods-enabled/workers.properties
# Where to put jk shared memory JkShmFile /var/run/apache2/jk.shm
# Where to put jk logs JkLogFile /var/log/apache2/mod_jk.log # [debug/error/info] JkLogLevel info JkLogStampFormat "[%a %b %d %H:%M:%S %Y]" JkRequestLogFormat "%w %V %T"
----------- workers.properties: # workers.properties.minimal - # # This file provides minimal jk configuration properties needed to # connect to Tomcat. # # The workers that jk should create and work with #
# # Defining a worker named ajp13w and of type ajp13 # Note that the name and the type do not have to match. # worker.ajp13w.type=ajp13 worker.ajp13w.host=localhost worker.ajp13w.port=8009
----------- uriworkermap.properties # uriworkermap.properties # # This file provides sample mappings for example wlb # worker defined in workermap.properties.minimal # The general syntax for this file is: # [URL]=[Worker name]
# # Mount jkstatus to /jkmanager # For production servers you will need to # secure the access to the /jkmanager url # /jkmanager=jkstatus
----------- Line added to my Virtual Host config file for this site in Apache: