Skip to content

Instantly share code, notes, and snippets.

@mitrofun
Forked from khanhicetea/nginx.conf
Created February 27, 2017 18:30
Show Gist options
  • Select an option

  • Save mitrofun/5baef205663147db80dff99e745841d0 to your computer and use it in GitHub Desktop.

Select an option

Save mitrofun/5baef205663147db80dff99e745841d0 to your computer and use it in GitHub Desktop.
NginX https redirect ( Cloudflare's flexible ssl )
server {
listen 80;
server_name example.com www.example.com;
if ($http_x_forwarded_proto = "http") {
return 301 https://$server_name$request_uri;
}
... directives to generate a response
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment