ajout playbook creation site
[lhc/ansible.git] / templates / nginx_paheko_common.j2
diff --git a/templates/nginx_paheko_common.j2 b/templates/nginx_paheko_common.j2
new file mode 100644 (file)
index 0000000..02eb52d
--- /dev/null
@@ -0,0 +1,17 @@
+server_name {{ SITE }}.{{ DOMAIN }}.{{ TLD }};
+root /home/www/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