I am having a problem with setting up a reverse proxy to my Tomcat installation. The website itself is fully working if accessed directly via Tomcat on port 8080. The proxy I have set up broadly works but a few features are not working. For example:
It looks like the common theme is the session variables. All of these functions work when loading the site directly via Tomcat, so the website itself is not at fault.
I have modified the Apache SSL config file located in sites-available as follows:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/example.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyPreserveHost On
ProxyPass "/" "http://localhost:8080/MyWebApp/"
ProxyPassReverse "/" "http://localhost:8080/MyWebApp/"
</VirtualHost>
</IfModule>
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
I have found the answer to this, it needs the following for the jsessionid to work:
ProxyPassReverseCookiePath “/” “http://localhost:8080/MyWebApp/” ProxyPassReverseCookieDomain “/” “http://localhost:8080/MyWebApp/”
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.
