Skip to content

Instantly share code, notes, and snippets.

@paulmars
Created November 18, 2011 00:30
Show Gist options
  • Save paulmars/1375098 to your computer and use it in GitHub Desktop.
Save paulmars/1375098 to your computer and use it in GitHub Desktop.
HTTPS only with redirect from http
server {
listen 443;
}
server {
listen 80;
rewrite ^(.*) https://$host$1 permanent;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment