I have Apache running as a reverse proxy and everything works perfectly when I connect to HTTP backend services. My current virtual host setup on port 443 looks like this:
ProxyPass /api/webapp http://127.0.0.1:8080/webapp/
ProxyPassReverse /api/webapp http://127.0.0.1:8080/webapp/
Users can access the service via https://127.0.0.1/api/webapp
without any issues.
However, when I try to modify the configuration to connect to an HTTPS backend service like this:
ProxyPass /api/webapp https://127.0.0.1:8443/webapp/
ProxyPassReverse /api/webapp https://127.0.0.1:8443/webapp/
Apache returns a 500 internal server error. The error message shows:
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@domain.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Checking the Apache error logs reveals these messages:
[Tue Sep 15 14:22:18 2014] [error] [client 127.0.0.1] SSL Proxy requested for 127.0.0.1:443 but not enabled [Hint: SSLProxyEngine]
[Tue Sep 15 14:22:18 2014] [error] proxy: HTTPS: failed to enable ssl support for [127.0.0.1]:8443 (127.0.0.1)
[Tue Sep 15 14:22:23 2014] [error] [client 127.0.0.1] SSL Proxy requested for 127.0.0.1:443 but not enabled [Hint: SSLProxyEngine]
[Tue Sep 15 14:22:23 2014] [error] proxy: HTTPS: failed to enable ssl support for [127.0.0.1]:8443 (127.0.0.1)
What configuration changes do I need to make Apache work with HTTPS backend servers?