X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=templates%2Fnginx_gestion_common.j2;fp=templates%2Fnginx_gestion_common.j2;h=03bb00c69325c088ffc11bfa474a28f496b3bc45;hb=5f7ed8e1233e5b2bb33ac343113d3fa5bfe77ec3;hp=0000000000000000000000000000000000000000;hpb=0e7e1f059f943f6617400cc32d155d73b4b4b9a3;p=lhc%2Fansible.git diff --git a/templates/nginx_gestion_common.j2 b/templates/nginx_gestion_common.j2 new file mode 100644 index 0000000..03bb00c --- /dev/null +++ b/templates/nginx_gestion_common.j2 @@ -0,0 +1,16 @@ +server_name {{ SITE }}.{{ DOMAIN }}.{{ TLD }}; +root /home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}/www; + +location / { + try_files $uri $uri/ /_route.php?$query_string; + index index.php /_route.php; +} + +location ~ \.php { + try_files $uri $uri/ /_route.php?$query_string; + include /etc/nginx/conf.d/fastcgi.conf; + fastcgi_index index.php ; + fastcgi_param REDIRECT_STATUS 200; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/run/php{{ php_version}}/fpm/php_{{ SIGLE }}_{{ SITE }}; +} \ No newline at end of file