Badly Badly misread the title of the question - Long day. The command directive you are looking for is this:
JkMountFile
You would put this directive in your httpd.conf (or a seperate mod_jk.conf depending on how you are setup)
From the documentation for apache
File containing multiple mappings from a context to a Tomcat worker. It is usually called uriworkermap.properties.
For inheritance rules, see: JkMountCopy.
There is no default value.
I'll leave this here in case anyone is interested.
So, since you have a workers.properties you are probably using mod_jk (which has been depreciated for mod_proxy_ajp*). workers.properties are actually part of the mod_jk configuration.
Yes, the documentation for mod_jk is pretty light. So I'll just go ahead and show you my production configuration as an example - you might have to modify it slightly as we run *nix boxes but the concepts are the same.
You httpd.conf should have something similar to this:
This tells apache to include a seperate mod_jk configuration file (you can actually put those directives right in the httpd.conf but... i like modularity). Then configure the alias, and the mount point for your jsp files.
Include <path_to_mod_jk.conf>
<VirtualHost *:80>
JkAutoAlias /usr/tomcat/webapps
JkMount /<your_webapp>/*.jsp <your_worker>
- Your mod_jk.conf should look something like this:
This is where you set all of your generic mod_jk setting for apache, logs, workers file, etc.
#MOD_JK Config File
JkWorkersFile <path_to_your_workers.properties>
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel error
JkShmFile /var/run/mod_jk.shm
3. And finally you should have a workers.properties similar to:
Finally we get to the meat of the config. This is where you setup the worker. the options are pretty self explanatory.
worker.<your_worker_name>.type=ajp13
worker.list=<your_worker_name>
#Worker Config
worker.<your_worker_name>.host=127.0.0.1
worker.<your_worker_name>.port=8009
- And yes, i still run this in production although we are starting a modernization project that will probably see the end of mod_jk and a migration to mod_proxy_ajp
Read more about mod_proxy_ajp or mod_jk. One of these modules will help you to have tomcat apps served by apache.
You cannot have two services on the same port, unless, you bind the services to different IPs.
Assuming you have two IPs you bind apache on first IP port 80 and tomcat on the second.
The easiest is using apache modules. Search for tomcat and apache configs that meet your needs.
HTH
Best Answer
Inside the Service tag change:
to:
For more information: http://tomcat.apache.org/tomcat-6.0-doc/config/http.html