Port forward apache https to tomcat https
Port forward apache https to tomcat https or port forward 443 to 8443
If you are running both apache and tomcat server in your VPS then you might be using mod proxy to forward request to port 80 to 8080, but once you have installed the SSL Certificate then you might need to generate it for both apache server and tomcat server and need to forward port 443 to port 8443. This is the same procedure as the previous one except for some additional configurations. The following config can be added to a conf file to port forward apache https to tomcat https, you can look at this post for more details on generating the SSL certificate for both the servers. Just make sure ProxyPass and ProxyPassReverse has ‘/’ at the end of URL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
SuexecUserGroup apache apache ServerName example.com ServerAlias www.example.com ProxyRequests Off ProxyPreserveHost On Order deny,allow Allow from all SSLProxyEngine On SSLProxyCheckPeerCN on SSLProxyCheckPeerExpire on ProxyPass / https://example.com:8443/ ProxyPassReverse / https://example.com:8443/ SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem Include /etc/letsencrypt/options-ssl-apache.conf |
Note on: SuexecUserGroup add www-data www-data for ubuntu, and apache apache for cent os