X-Git-Url: http://git.cyclocoop.org/%27.generer_url_public%28%27distrib%27%29.%27?a=blobdiff_plain;f=templates%2Fnginx_WP_server.j2;h=0589c9a82fdd7f4f6da646f1bdc28069886bf1c2;hb=d9743190e260a4dda455579bbf6e893fde310c58;hp=a501e6d8540089c2adf8510c70683964529e257d;hpb=082b4f8812ccc9e47addc2c4f62d477c56fbce43;p=lhc%2Fansible.git diff --git a/templates/nginx_WP_server.j2 b/templates/nginx_WP_server.j2 index a501e6d..0589c9a 100644 --- a/templates/nginx_WP_server.j2 +++ b/templates/nginx_WP_server.j2 @@ -1,21 +1,21 @@ server { listen 80; server_name {{ DOMAIN }}.{{ TLD }} {{ config_ss_domain | default(SITE) }}.{{ DOMAIN }}.{{ TLD }}; - root /home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}/; - 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; + root /home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}/; + access_log /home/sites/log/nginx/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}/access.log main buffer=32k; + error_log /home/sites/log/nginx/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}/error.log warn; {% if ssl_ready is defined and ssl_ready %} return 301 https://$server_name$request_uri; } server { listen 443; - ssl_certificate /etc/letsencrypt/live/{{ SITE }}.{{ DOMAIN }}.{{ TLD }}/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/{{ SITE }}.{{ DOMAIN }}.{{ TLD }}/privkey.pem; - 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; + ssl_certificate /etc/letsencrypt/live/{{ config_ss_domain }}.{{ DOMAIN }}.{{ TLD }}/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/{{ config_ss_domain }}.{{ DOMAIN }}.{{ TLD }}/privkey.pem; + access_log /home/sites/log/nginx/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}/access.log main buffer=32k; + error_log /home/sites/log/nginx/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}/error.log warn; + root /home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}/; + server_name {{ DOMAIN }}.{{ TLD }} {{ config_ss_domain | default(SITE) }}.{{ DOMAIN }}.{{ TLD }}; {% endif %} - server_name {{ DOMAIN }}.{{ TLD }} {{ config_ss_domain | default(SITE) }}.{{ DOMAIN }}.{{ TLD }}; - root /home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}/; index index.php index.html index.htm; client_max_body_size 500M; location / { @@ -36,7 +36,7 @@ server { } location ~ \.php$ { include snippets/fastcgi-php.conf; - fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; + fastcgi_pass unix:/run/php{{ php_version }}/fpm/php_{{ SIGLE }}_{{ config_ss_domain }}; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }