: You should stop using mod_jk and start using mod_proxy. I run tomcat on port 8080. The web app that powers my site has an internal url like http://localhost:8080/mysite I use mod proxy
You should stop using mod_jk and start using mod_proxy. I run tomcat on port 8080. The web app that powers my site has an internal url like localhost:8080/mysite I use mod proxy to make it available at mysite.example.com/ I use a firewall to ensure that only port 80 is accessible from the outside world. mod_proxy is much more flexible than mod_jk. Tomcat makes application available both http port 8080 and through the ports that mod_jk uses by default, so you likely won't even have to change your tomcat settings.
My apache configuration looks like this for that site
<VirtualHost *:*>
Servername mysite.example.com
ProxyRequests Off
ProxyPass / localhost:8080/mysite/ ProxyPassReverseCookiePath /mysite /
ProxyPassReverseCookieDomain localhost mysite.example.com
</VirtualHost>
The cookie stuff is so that session cookies get translated by mod_proxy correctly. You can also have mod_proxy rewrite the links if you need to. In my case, my web app handles that.
More posts by @Eichhorn148
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.