apache2 infront of tomcat6 with mod_jk or mod-proxy problem
I have tried both mod-proxy and mod_jk. To be honest mod-proxy is more simple.
In mod-proxy everything has worked. And necessity for NOT restarting tomcat to make chages has been reached. BUT as I said above I am using tokenSession interceptor, and with mod-proxy EVERY form submission is recieving "invalid.token" result. May be you know how to solve this issue. The configuration has been made with mod-proxy is as following:
ProxyRequests Off
ProxyPreserveHost On
Allow from all
ProxyPass /PIconstructionWeb
ProxyPassReverse /PIconstructionWeb
ProxyPass /PIdistributionWeb
ProxyPassReverse /PIdistributionWeb
ProxyPass /
ProxyPassReverse /
On the other hand with mod_jk everything is working (including tokenSession issue). But necessity for NOT restarting tomcat has not been reached. Because one of my wars should reside in ROOT directory of tomcat, and whenever I want to switch I have to restart tomcat. The worker I have defined, is as following:
Define 1 real worker using ajp13
worker.list=piworker
Set properties for piworker (ajp13)
worker.piworker.type=ajp13
worker.piworker.host=localhost
worker.piworker.port=8009
I wonder is there any thechnique here to define meaning of the following?
worker.piworker1.host=localhost:8009/PIconstructionWeb
worker.piworker2.host=localhost:8009/PIdistributionWeb
If somebody has solved similar problem please help.
PS with mod_jk: defining workers with differenent ports, and in tomcat server.xml setting different listening ports to 2 wars is tedious and not preferred.
My tomcat should not be restarted because system should always respond to 3rd party external payment systems. And they are working 24 hours a day.