Skip to content

Instantly share code, notes, and snippets.

@codeprimate
Created June 2, 2015 02:50
Show Gist options
  • Save codeprimate/0bf62b50767ea8ba65e1 to your computer and use it in GitHub Desktop.
Save codeprimate/0bf62b50767ea8ba65e1 to your computer and use it in GitHub Desktop.
NginX HTTPS Redirect
server {
# ...
# force https-redirects
if ($scheme = http) {
return 301 https://$server_name$request_uri;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment