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

23 lines
583 B
Plaintext
Raw Normal View History

2015-07-30 18:02:21 +07:00
{% extends "_base.j2" %}
2015-07-30 18:02:21 +07:00
{% block template_index %}
index {{ item.index | default('index.html index.htm index.php') }};
{% endblock %}
{% block template_try_files %}
2019-02-20 23:08:56 +07:00
try_files {{ item.override_try_files | default('$uri $uri/ =404') }};
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 {{ item.php_upstream }};
2015-07-30 18:02:21 +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 %}
2015-07-30 18:02:21 +07:00
include fastcgi.conf;
}
{% endblock %}