I have configured a reverse proxy in Apache2. It gets requests by HTTPS - unwraps the HTTPS and then forwards to local HTTP-processes for /web and /rest.
<VirtualHost *:4443>
ProxyPass /web http://127.0.0.1:8080/web
ProxyPassReverse /web http://127.0.0.1:8080/web
ProxyPass /rest http://127.0.0.1:8181
ProxyPassReverse /rest http://127.0.0.1:8181
ServerName myserver123.abc.xyz.org
ProxyPreserveHost On
SSLEngine On
SSLProxyEngine On
SSLCertificateFile /etc/apache2/certs/server.cer
SSLCertificateKeyFile /etc/apache2/certs/server.key
This is working fine. Every request to / is forbidden.
But now I try to forward every request to / to /web instead of the 403-forbidden response.
I inserted this before the ServerName line.
ProxyPass / http://127.0.0.1:8080/web
ProxyPassReverse / http://127.0.0.1:8080/web
But does not work.
All I get in the browser is
Bad Request Your browser sent a request that this server could not understand. Reason: You're speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please.
How can I get me forward from / to /web?