tomcat 6 help
1) I have changed my domain so that it points to my linode IP address.
2) I have already installed tomcat6 to my linode. Uploaded neccesary WAR file, and can see the results by typing
My question is: what kind of extra work should I do, so that the above site opens when I just type
Thank you for your answer.
6 Replies
@aboronov:
Hi!
1) I have changed my domain so that it points to my linode IP address.
2) I have already installed tomcat6 to my linode. Uploaded neccesary WAR file, and can see the results by typing
http://www.virbank.ru:8080/PIconstructionWeb/ My question is: what kind of extra work should I do, so that the above site opens when I just type
www.virbank.ru (i.e. without port number AND /PiconstructionWeb words)Thank you for your answer.
The "usual" way to do this is to run apache and use mod_jk to link it up to tomcat. I'm sure it's possible with nginx as well. Basically, you want to get a webserver up on port 80 that'll forward appropriate traffic to tomcat on 8080
Try this in the virtual config for the root Apache site:
ProxyPassReverse /
:
:
This may or may not work with nginx as the front end.
@jebblue:
I don't use the modjk I use modproxy
Oh yeah, that would work too, wouldn't it. Sorry, never actually setup tomcat myself. At work I use it, but another group set it up and they used mod_jk, but that's on a monster solaris box.
All I know is it works and it's simple. GWT isn't bothered by it.
Just found a great proxy directive to go with ProxyPass which makes Apache pass in the full Host header:
ProxyPreserveHost On
This solved a cookie issue I was having.
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.piworker1.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.
@aboronov:
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.
I'd look into Tomcat's emptySessionPath attribute to see if it applies to your situation.
Also look into Loader delegate setting in context.xml.