When trying HTTPS, if no SSL is installed, the user is redirected to the first virtual server website instead of current website.
For example, a user tries to access https://website.com, but this virtual server has no SSL, the user will get a warning, and if they choose to continue, they will be redirected to another website (what it seems the first virtual server added on virtualmin) instead of showing http://website.com or https://website.com with a warning icon.
I’m not sure why it’s redirecting to another domain, but more importantly, I don’t know how to change this.
PS: We do not want to install SSL on these websites.
The way Apache chooses which VirtualHost to serve is wildly unintuitive. It is consistent, but it seems insane to any human. But, it indicates a misconfiguration somewhere in the use of IP or * or IPv6 addresses in VirtualHost sections in the Apache config.
Note that an SSL VirtualHost is a whole other VirtualHost. So…you can get the “right” behavior with SSL sites and the “wrong” behavior with non-SSL sites. They’re separate VirtualHosts with their own configuration.