Skip to content

Instantly share code, notes, and snippets.

@UndoneKittens
Forked from khanhicetea/nginx.conf
Created September 21, 2017 00:17
Show Gist options
  • Save UndoneKittens/e1a10075e478bcf78b7e7bf08f8e3894 to your computer and use it in GitHub Desktop.
Save UndoneKittens/e1a10075e478bcf78b7e7bf08f8e3894 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