Skip to content

Instantly share code, notes, and snippets.

@41tair
Created January 22, 2019 07:06
Show Gist options
  • Save 41tair/4ca1a57ea37d7fd434dfabd1cf47bca0 to your computer and use it in GitHub Desktop.
Save 41tair/4ca1a57ea37d7fd434dfabd1cf47bca0 to your computer and use it in GitHub Desktop.
nginx 80 to 443
server {
listen 80;
server_name _;
if ($http_x_forwarded_proto = 'http'){
return 301 https://$host$request_uri;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment