Skip to content

Instantly share code, notes, and snippets.

@strangerstudios
Created February 13, 2017 20:49
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 strangerstudios/cfaed89ed3bed51079d515a34c9cba60 to your computer and use it in GitHub Desktop.
Save strangerstudios/cfaed89ed3bed51079d515a34c9cba60 to your computer and use it in GitHub Desktop.
nginx configuration to redirect http to https
#nginx configuration to redirect http to https
# from https://www.bjornjohansen.no/redirect-to-https-with-nginx
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
@phoz0n
Copy link

phoz0n commented May 4, 2018

Thanks very helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment