Skip to content

Instantly share code, notes, and snippets.

@anx-ag
Created September 1, 2022 04:46
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 anx-ag/9cd66bb79d8582e0f614f728e9241714 to your computer and use it in GitHub Desktop.
Save anx-ag/9cd66bb79d8582e0f614f728e9241714 to your computer and use it in GitHub Desktop.
server {
server_name _;
listen 80 default_server;
listen [::]:80 default_server;
# redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
return 301 https://$host$request_uri;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment