Cloudflare Force or redirect to HTTPS in Nginx

I need to redirect anyone that enters on a specific domain/subdomain to use https protocol…

This is how

    server {
       if ($http_x_forwarded_proto = "http") {
         return 301 https://$server_name$request_uri;

Grabbed from

Leave a Reply

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


This site uses Akismet to reduce spam. Learn how your comment data is processed.