Skip to content

Instantly share code, notes, and snippets.

@aa6my
Forked from khanhicetea/nginx.conf
Created June 6, 2017 04:11
Show Gist options
  • Save aa6my/b1fd1de109acb58269341dc92e8ca7a5 to your computer and use it in GitHub Desktop.
Save aa6my/b1fd1de109acb58269341dc92e8ca7a5 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