Skip to content

Instantly share code, notes, and snippets.

@VirtuBox
Last active June 27, 2017 13:59
Show Gist options
  • Save VirtuBox/156ebaeac18b79cb9b6844c8ebc428cf to your computer and use it in GitHub Desktop.
Save VirtuBox/156ebaeac18b79cb9b6844c8ebc428cf to your computer and use it in GitHub Desktop.
Redirect http to https with nginx
server {
listen 80;
listen [::]:80;
server_name yourdomain.tld www.yourdomain.tld;
return 301 https://yourdomain.tld$request_uri;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment