ansible-nginx/templates/etc/nginx/sites-available/_symfony.j2

28 lines
551 B
Plaintext
Raw Normal View History

2019-12-26 23:55:07 +07:00
{% 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(/|$) {
fastcgi_pass {{ item.php_upstream }};
2019-12-26 23:55:07 +07:00
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 %}