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

23 lines
597 B
Django/Jinja

{% extends "_base.j2" %}
{% block template_index %}
index {{ item.index | default('index.html index.htm index.php') }};
{% endblock %}
{% block template_try_files %}
try_files $uri $uri/ /index.php;
{% endblock %}
{% block template_upstream_location %}
location ~ \.php$ {
fastcgi_pass php;
fastcgi_index index.php;
{# TODO: fastcgi_intercept_errors {{ item.php.intercept_errors | default('on') }}; #}
fastcgi_intercept_errors on;
{% if nginx_version.stdout | version_compare('1.6.1', 'lt') %}
include fastcgi_params;
{% else %}
include fastcgi.conf;
{% endif %}
}
{% endblock %}