@@ -5,10 +5,12 @@ server {
index {{ index }};
server_name {{ fqdn }};
{% if rewrites -%}
# Generic URL rewrites.
{% for rewrite in rewrites -%}
rewrite {{ rewrite }};
{% endfor %}
{% endfor -%}
{% endif %}
{% if deny_files_regex -%}
# Deny access to user-specified files.
@@ -16,7 +18,7 @@ server {
location ~ {{ regex }} {
deny all;
}
# Interpret PHP files via FastCGI.
@@ -27,17 +29,17 @@ server {
# Serve the files.
location ~ /(.+) {
try_files $uri $uri/{% if php_rewrite_urls %}@php_rewrite{% endif %};
try_files $uri $uri/{% if php_rewrite_urls %} @php_rewrite{% endif %};
{% if php_rewrite_urls -%}
# Apply URL rewrites.
location @php_rewrite {
{% for rewrite in php_rewrite_urls -%}
{% for rewrite in php_rewrite_urls %}
{% endif -%}
access_log /var/log/nginx/{{ fqdn }}-access.log;
error_log /var/log/nginx/{{ fqdn }}-error.log;