Skip to content

Instantly share code, notes, and snippets.

@Shterneregen
Created July 10, 2020 23:56
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 Shterneregen/5f0c5addd63c6ac4c55848a87608fc76 to your computer and use it in GitHub Desktop.
Save Shterneregen/5f0c5addd63c6ac4c55848a87608fc76 to your computer and use it in GitHub Desktop.
NGINX server block that redirects all requests to https
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment