X-Git-Url: http://git.cyclocoop.org/%28?a=blobdiff_plain;f=templates%2Fnginx_www_server.j2;h=fd9ba1fca1e13b8d88f5af3f263ca5a2ec539091;hb=127e62e0da098421ca5cfa85e73648419c9ea17b;hp=68b7502fad01dbbed39673b720d1c7dcd42a1a1e;hpb=5f7ed8e1233e5b2bb33ac343113d3fa5bfe77ec3;p=lhc%2Fansible.git diff --git a/templates/nginx_www_server.j2 b/templates/nginx_www_server.j2 index 68b7502..fd9ba1f 100644 --- a/templates/nginx_www_server.j2 +++ b/templates/nginx_www_server.j2 @@ -1,10 +1,10 @@ server { listen 80; - server_name {{ DOMAIN }}.{{ TLD }}; + include /etc/nginx/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}/common.conf; access_log /home/sites/log/nginx/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}/access.log main buffer=32k; error_log /home/sites/log/nginx/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}/error.log warn; {% if ssl_ready is defined and ssl_ready %} - return 301 https://{{ DOMAIN }}.{{ TLD }}$request_uri; + return 301 https://$server_name$request_uri; } server { listen 443 ssl;