Skip to content

Instantly share code, notes, and snippets.

@tjunussov
Last active July 2, 2018 10:09
Show Gist options
  • Save tjunussov/120b75fc6e69628d9f6a45a8af862693 to your computer and use it in GitHub Desktop.
Save tjunussov/120b75fc6e69628d9f6a45a8af862693 to your computer and use it in GitHub Desktop.
## DEFAULT
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name host1.org host2.org;
autoindex off;
log_not_found off;
client_max_body_size 1M;
# return 301 https://$server_name$request_uri; Nginx will pick the first entry of the server_name variable. Try using $http_host instead and see if that helps.
return 301 https://$http_host$request_uri;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment