From 2a612a55b9419d287a0521165ad873744bb62eb3 Mon Sep 17 00:00:00 2001 From: Emilien Mantel Date: Thu, 26 Dec 2019 17:55:07 +0100 Subject: [PATCH] Ajout symfony template --- .../etc/nginx/sites-available/_symfony.j2 | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 templates/etc/nginx/sites-available/_symfony.j2 diff --git a/templates/etc/nginx/sites-available/_symfony.j2 b/templates/etc/nginx/sites-available/_symfony.j2 new file mode 100644 index 0000000..8cab2fa --- /dev/null +++ b/templates/etc/nginx/sites-available/_symfony.j2 @@ -0,0 +1,28 @@ +{% extends "_php.j2" %} + +{% block template_try_files %} + try_files $uri /index.php$is_args$args; +{% endblock %} + +{% block template_upstream_location %} + location /bundles { + try_files $uri =404; + } + + location ~ ^/index\.php(/|$) { + # {{ php_info }} + fastcgi_pass {{ php_upstream }}; + fastcgi_index index.php; +{% if item.upstream_params is defined and item.upstream_params is iterable %} +{% for param in item.upstream_params %} + {{ param }} +{% endfor %} +{% endif %} + include fastcgi.conf; + internal; + } + + location ~ \.php$ { + return 404; + } +{% endblock %}