File diff a3d735d2655f → 7f8ef577fa2c
roles/php_website/templates/nginx_site.j2
Show inline comments
 
@@ -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;
 
    }
 
    {% endfor %}
 
    {% endfor -%}
 
    {% endif %}
 

	
 
    # 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 -%}
 
        rewrite {{ rewrite }};
 
        {% endfor %}
 
    {% for rewrite in php_rewrite_urls %}
 
    rewrite {{ rewrite }};
 
    {% endfor -%}
 
    }
 
    {% endif %}
 
    {% endif -%}
 

	
 
    access_log /var/log/nginx/{{ fqdn }}-access.log;
 
    error_log /var/log/nginx/{{ fqdn }}-error.log;