Thanks Christopher & Mikolaj for your very helpful information. I move my 'JkMount *.jsp workerA' information from mod_jk.conf into my virtual hosts tag and restart apache. When I attempt to access my url test1.foo.com, apache tell me it cannot find my home.do page to login (not found in this server, but when I simply move this back to the mod_jk.conf file again, I can login?
The only thing I leave in the mod_jk.conf file is the location of the log/worker.properties files. Is this a windows relative path issue? Thanks, Nicola -----Original Message----- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: 10 October 2008 20:36 To: Tomcat Users List Subject: Re: apache virtual hosts using different tomcat on different servers -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Nicola, Nicola Burns wrote: > Is it possible to have the following scenario configured? Executive summary: different back-end Tomcat servers for different VistualHosts. The answer is "of course you can"! It sounds like you want this: VirtualHost test1.foo.com workerA -> localhost:jboss VirtualHost test2.foo.com workerB -> server2:jboss > test1.foo.com works. Test2.foo.com goes to the same application because > they are both reading from the localhost mod-jk.conf. mod-jk.conf isn't something standard, so whatever you have has been home-built. I suspect that you have all your mod_jk configuration in there, including JkMount statements, and that you are including it at the top-level. You have to separate your JkMount statements into your VirtualHosts. For example, I have a global mod_jk.conf file and it looks like this: LoadModule jk_module /usr/lib/apache2/modules/mod_jk-1.2.26.so JkLogFile /var/log/apache2/mod_jk.log JkWorkersFile /usr/lib/apache2/modules/jk_workers.properties JkShmFile /var/log/apache2/jk-runtime-status That's it! Everything else goes into the appropriate VirtualHost along with the rest of the config for that VH. Note that the workers configuration is shared. That means that workers.properties must contain the configuration for all workers across all virtual hosts. Maybe something like this: workers.list=workerA,workerB workerA.host=localhost workerA.port=[your jboss port] workerB.host=server2 workerB.port=[your jboss port] Then, you need something in each VirtualHost that looks like this (your configuration may vary wildly, but this should get you started): <VirtualHost test1.foo.com> ... other VH configuration ... JkMount *.jsp workerA </VirtualHost> <VirtualHost test2.foo.com> ... other VH configuration ... JkMount *.jsp workerB </VirtualHost> With regard to Mikolaj's comments, mod_jk just has a different style of defining endpoints than mod_proxy_ajp. Technically, mod_jk does not require workers.properties, nor does it require mod-jk.conf. Hope that helps, - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkjvrogACgkQ9CaO5/Lv0PDRsgCfSTIG1xxGriYilkyXNwrY+6c7 qEoAoJWNFsiOpSFttrqRKdZ6OPDGwY51 =wBnJ -----END PGP SIGNATURE----- --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]