1

This is getting frustrating to say the least haha.

I have setup a proxypass and proxypassreverse in apache under virtual host 443 to proxy to nginx running in a container on port 8443.

This is all I have set up to do this

CustomLog /srv/apps/ktech-connect/log/apache/custom.log combined
ErrorLog /srv/apps/ktech-connect/log/apache/errors.log

SSLProxyEngine On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
ProxyPass        / https://127.0.0.1:8443/
ProxyPassReverse / https://127.0.0.1:8443/

When I hit any url such as example.com/page it works like it should But when I go to example.com or even example.com/ it will show a redirect from apache to example.com:8443 in the url.

I have tried adding ProxyPreserveHost but it does nothing, and a whole host of other options. I just don't understand where the redirect is coming from and the fact that it only happens when hitting the base url.

Any thoughts?

VIDesignz
  • 113
  • 5

1 Answers1

1

The redirect is not coming from the snippet of config that you show. It may come from anywhere, even your browser's cache.

Gerard H. Pille
  • 2,569
  • 1
  • 13
  • 11
  • Maybe you could have a look at another open question of mine if you are bored ;) https://serverfault.com/questions/1066681/upgrading-websocket-using-nginx-and-daphne-only-works-if-i-put-port-number-in-a – VIDesignz Jun 15 '21 at 00:09