reverse proxy http to tomcat

Posted by John Q on Server Fault See other posts from Server Fault or by John Q
Published on 2013-06-29T17:25:50Z Indexed on 2013/06/29 22:23 UTC
Read the original article Hit count: 219

Filed under:
|

I've configured an Apache server with SSL and reverse proxy to a tomcat

<VirtualHost domain.com:1443>
[...]
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://local.com:8080/
ProxyPassReverse / http://local.com:8080

SSLEngine on
[...]
</VirtualHost>

Tomcat is listening on 8080. The issue is that the app on tomcat is redirecting the request (HTTP 302 Moved temporairly). For example, if I use the URL https:// domain.com:1443/folder, reverse proxy launch the request http:// local.com:8080/folder, then, the app redirect to "/subfolder", so the final request is: http://domain.com:1443/folder/subfolder. Result is a 400 Bad request error code, as the request is HTTP on my SSL port.

Do you know how I can fix this issue ?

Thanks in advance.

© Server Fault or respective owner

Related posts about apache2

Related posts about reverse-proxy