Created
July 10, 2020 23:56
-
-
Save Shterneregen/5f0c5addd63c6ac4c55848a87608fc76 to your computer and use it in GitHub Desktop.
NGINX server block that redirects all requests to https
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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