Skip to content

Instantly share code, notes, and snippets.

@CiprianSpiridon
Created April 24, 2017 12:16
Show Gist options
  • Save CiprianSpiridon/afe325499e1b9d2b84d7261de0b0853f to your computer and use it in GitHub Desktop.
Save CiprianSpiridon/afe325499e1b9d2b84d7261de0b0853f to your computer and use it in GitHub Desktop.
Redirect all HTTP requests to HTTPS with Nginx
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