I have around 10 virtual servers hosted with virtualmin and I have applied an SSL to one of them. I would like to set up a redirect so that viewers visiting http://www.myexample.com get redirected to https://www.myexample.com.
I have setup a permenant redirect from http://www.myexample.com to https://www.myexample.com but this doesnt do anything, just goes to http.
If I set the port to 443 then I can go to https site with no problems and see the cert. If I set as 80 then I can go to http site with no problems. If I set port as any I can go to http but not https.
maybe take a look at hbmn.ca/webmail where I have a successful redirect like that.
How exactly looks the line in httpd.conf file?
It must be as this:
Redirect Permanent / https://yourdomain.dom
I made a file called index.html in the default directory with this line in it:
<meta HTTP-EQUIV="REFRESH" content="0; url=https://www.hbmn.ca:20000">
This is a zero delay redirect. Works fine.