Monday, January 2, 2017

apache 2.2 - reverse proxy http to tomcat

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





[...]
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://local.com:8080/
ProxyPassReverse / http://local.com:8080

SSLEngine on
[...]




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.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...