serverpilot-letsencrypt icon indicating copy to clipboard operation
serverpilot-letsencrypt copied to clipboard

Adding Redirect all traffic to HTTPS to nginx option

Open joviczarko opened this issue 7 years ago • 4 comments

Maybe it would be a good idea to make this option so after installing certificate we have option to redirect all traffic to HTTPS. Like the Certbot does it. If I figure out how it should be done I'll make a pull request.

joviczarko avatar Aug 23 '17 18:08 joviczarko

This is done using .htaccess and the details can be found on the server pilot documentation:

https://serverpilot.io/community/articles/how-to-force-SSL-by-redirecting-http-to-https.html

caroseuk avatar Aug 24 '17 07:08 caroseuk

Unfortunately I keep getting redirected to http: and wordpress is no longer accessible as I get a redirection error.

davidmichelfonseca avatar Nov 04 '17 11:11 davidmichelfonseca

If it’s constantly redirecting then it’s more than likely a plug-in or core Wordpress setting which has http set. I would remove the redirect, check your settings in WP and any plugins you have a try again.

caroseuk avatar Nov 04 '17 11:11 caroseuk

I actually ran into the same issue. The http version wouldn't even load (apparently it wasn't listening for port 80) so the .htaccess never kicked in.

brettburwell avatar Nov 05 '17 21:11 brettburwell