Skip to content

Instantly share code, notes, and snippets.

@eftakhairul
Last active November 30, 2016 16:32
Show Gist options
  • Save eftakhairul/e0583b838547ed7282d87ecad5562d3b to your computer and use it in GitHub Desktop.
Save eftakhairul/e0583b838547ed7282d87ecad5562d3b to your computer and use it in GitHub Desktop.
Forcefully redirect from http to https
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name example.com;
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