fbpx

How can I redirect Apache (Virtualmin) website to port 443

The default rule used by Virtualmin for a modern Ubuntu based Apache Virtualmin server is:

RedirectMatch ^/(?!.well-known)(.*)$ https://example.com/$1

The catch is you can’t just put this anywhere – you have to put it in the HTTP section. So if you see this at the end of the HTTP section, you’re on the right track:

RedirectMatch ^/(?!.well-known)(.*)$ https://example.com/$1
Redirect /mail/config-v1.1.xml /cgi-bin/autoconfig.cgi
Redirect /.well-known/autoconfig/mail/config-v1.1.xml /cgi-bin/autoconfig.cgi
</VirtualHost>

Share this article

Share on facebook
Share on twitter
Share on linkedin

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top