Skip to content

Instantly share code, notes, and snippets.

@Nikschavan
Last active January 29, 2018 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nikschavan/c2a5cbb5181078df8f532dda5030319a to your computer and use it in GitHub Desktop.
Save Nikschavan/c2a5cbb5181078df8f532dda5030319a to your computer and use it in GitHub Desktop.
Force http-https Redirect nginx
server {
listen 80;
server_name www.<your-domain> <your-domain>;
return 301 https://www.<your-domain>$request_uri;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment