Content
Apache double reverse proxy
Added by Sridhar Malkaram over 3 years ago
I want to configure open project with two apache proxy servers. The first proxy server is internet facing. The second proxy server is behind NAT router. The port 8443 from first proxy is forwarded to port 443 on second proxy server.
The first proxy server has the following directives
##PROXY1 on HOST1
<VirtualHost *:443>
ServerName openproject.myexample.com
ServerAlias www.myexample.com
ProxyPass / https://127.0.0.1:8443/ retry=0
ProxyPassReverse / https://127.0.0.1:8443/
ProxyPreserveHost On
ProxyRequests Off
ProxyVia On
</VirtualHost>
The second proxy has the following
##PROXY2 on HOST2
<VirtualHost *:443>
ServerName openproject.myexample.com
ProxyPass / http://127.0.0.1:6000/ retry=0
ProxyPassReverse / http://127.0.0.1:6000/
ProxyPreserveHost Off
ProxyRequests Off
ProxyVia Off
</VirtualHost>
However this configuration is not working when I browse https://openproject.myexample.com from HOST1. I just see a blank page.
However, when I browse at https://openproject.myexample.com from HOST2 it works fine.
I can also see other website pages on HOST2 from HOST1. For example https://www.myexample.com, which is pointing to "/var/ww/html/index.html".
Could you please let me know what I am doing wrong?