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!
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.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.