Skip to content

Commit

Permalink
nginx: replace return statement with location stanza on https_redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
1977er committed Dec 18, 2018
1 parent 770fc0a commit 1174e2e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion roles/nginx/templates/02-nginx-site.j2
Expand Up @@ -7,7 +7,10 @@ server {
access_log off; access_log off;
error_log /var/log/nginx/error-{{ item.domain }}.log; error_log /var/log/nginx/error-{{ item.domain }}.log;


return 301 https://{{ item.domain }}$request_uri; location / {
return 301 https://{{ item.domain }}$request_uri;
}

{% else %} {% else %}
{% include '04-nginx-site-basics.j2' %} {% include '04-nginx-site-basics.j2' %}
{% include '05-nginx-site-location.j2' %} {% include '05-nginx-site-location.j2' %}
Expand Down

0 comments on commit 1174e2e

Please sign in to comment.