I have two configurations - development and staging - with (supposedly) identical configurations: a set of HTTP-only Apache instances sitting behind a Citrix load balancer that allows both HTTP and HTTPS connections.
The Apache VirtualHost definitions contain the following directives:
RedirectMatch permanent /something/endpoint(.*)$ /something/otherendpoint$1
SSLProxyEngine On
ProxyPass /something/endpoint !
ProxyPass /something https://192.168.1.100:6443/something
<Location /something>
ProxyPassReverse https://192.168.1.100:6443/something
</Location>
So, I want to proxy any requests for /something
to a different backend HTTPS server, except for /something/endpoint
, which I need to redirect.
Now, everything is working fine in my development environment. I can access http://hostname/something/endpoint
and it will redirect me to http://hostname/something/otherendpoint
. Likewise, I can access https://hostname/something/endpoint
and it will redirect me to https://hostname/something/otherendpoint
.
But in the staging environment, both http://hostname/something/endpoint
and https://hostname/something/endpoint
redirect to http://hostname/something/otherendpoint
- it does not preserve HTTPS.
I have been pulling my hair out trying to figure out what the difference is between the two configurations. There must be something causing Apache to not respect the access protocol, but I'm not able to isolate it. The HTTP response headers look the same in both environments, except for the redirect Location
header that specifies http
instead of https
.
Any ideas about what configuration difference could be causing this?