Hi @mksrom We have tried different possibilities keeping ProxyPreserveHost On and Off. Below are few of the important observations
- Whether we keep ProxyPreserveHost On/Off, if we have both ProxyPass and ProxyPassReverse are configured in emr_ssl.conf file as @mksrom mentioned, the redirection of URL is happening as expected.
And this is when HTTPS runs on 443 port. So having ProxyPreserveHost On/Off doesn’t have any effect as long as we have ProxyPass and ProxyPassReverse are in place.
- But if we want to run https on other than 443 port (eg: 9443 port), the below changes need to be done to ssl.conf file.
- ProxyPreserveHost should be off and
- The port should be changed from 443 to 9443 at bahmni-package/bahmni-web/resources/ssl.conf at master · Bahmni/bahmni-package · GitHub and bahmni-package/bahmni-web/resources/ssl.conf at master · Bahmni/bahmni-package · GitHub places.
Now we can access openmrs with this URL https://demo.mybahmni.org:9443/openmrs. Domain has valid SSL certificates and the redirection of URL is happening properly. But if we set ProxyPreserveHost On the ProxyPassReverse doesn’t have any effect and the redirection of URL is not working.
Conclusion: In either of the above cases having ProxyPreserveHost On has no effect and its complicating the things.
Thanks @sudhamsh for your inputs. please add if I have missed any.