2015-07-30 18:02:21 +07:00
|
|
|
{% extends "_base.j2" %}
|
|
|
|
{% block template_index %}
|
|
|
|
index {{ item.index | default('index.html index.htm index.php') }};
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block template_try_files %}
|
2015-08-14 16:14:56 +07:00
|
|
|
try_files $uri $uri/ /index.php;
|
2015-07-30 18:02:21 +07:00
|
|
|
{% endblock %}
|
|
|
|
|
2015-07-30 20:37:25 +07:00
|
|
|
{% block template_upstream_location %}
|
2015-07-30 18:02:21 +07:00
|
|
|
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 %}
|
|
|
|
|
|
|
|
# TODO...
|
|
|
|
# Newrelic custom header: https://docs.newrelic.com/docs/apm/other-features/request-queueing/request-queue-server-configuration-examples
|
|
|
|
#fastcgi_param HTTP_X_REQUEST_START "t=${msec}";
|
|
|
|
# Newrelic custom PHP appname: https://docs.newrelic.com/docs/agents/php-agent/configuration/php-directory-ini-settings#perdir-nginx
|
|
|
|
#fastcgi_param PHP_VALUE "newrelic.appname=${host}";
|
|
|
|
}
|
|
|
|
{% endblock %}
|