[nginx] Virtual server redirect to https

I am using new feature for redirecting all traffic for single virtual server from HTTP => HTTPS.

Virtualmin > Virtual Server > Website Options > Redirect all requests to SSL site?

All works good, until when we have domain aliases. Traffic from alias domain is redirected to primary domain because it is hardcoded in nginx config. I fixed issue by changing hardcoded domain name with variable “$host”


What would be the proper way to fix this? Should it be implemented in new version?

Have a nice day :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.