I am using LEMP stack with Virtual which I installed using “–bundle LEMP” while installing virtualmin on a debian9 OS.
When I below settings, The https redirect is not working on any of the domains.
System Settings --> Virtualmin Configurations --> SSL Settings --> Redirect all http to https by default --> yes
However I am able to do the redirect by adding below code in domain.com.conf
server {
server_name domain.com www.domain.com;
listen ipaddress:80;
rewrite ^/(.*) https://domain.com/$1 permanent;
}
But I wonder why the inbuilt feature that ships with virtualmin is not working?
Please note I am using Lets’ Encrypt SSL.
on other note I wonder what type of Redirect Virtualmin does if that feature is to work? Is it also 301 redirect?
Any help on this would be immensely helpful.
Thanks