correction syntaxe
[lhc/ansible.git] / templates / nginx_WP_server.j2
index a501e6d..a41c72d 100644 (file)
@@ -13,9 +13,9 @@ server {
     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;
+    root /home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}/;
+    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 }}_{{ SITE }};
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
          include fastcgi_params;
     }