When trying HTTPS, if no SSL is installed, the user is redirected to the first virtual server website instead of current website

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.

SYSTEM INFORMATION
OS type and version Debian Linux 10
Virtualmin version 7.9.0

This is some variant of “the wrong site shows up”. Website Troubleshooting – Virtualmin

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.

1 Like

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