We have a Spring Boot (Spring MVC) app with embedded Tomcat on a dedicated appserver behind an Apache SSL proxy.
The SSL port on the proxy server is 4433, forwarding
Try setting the Rewrite rule like: https://proxyserver:4433/appname >>forward>> http://appserver:8080/appname
And then set your application context to "appname" server.context-path=/appname
So locally you can run by http://appserver:8080/appname and via Reverse Proxy you access via https://proxyserver:4433/appname
Since I am using JBOSS, changes in standalone.xm of jboss:
Tomcat would have similar config, to inform Tomcat (proxy-address-forwarding="true") to respect the proxy forwarding address.