Files
@ 981584549895
Branch filter:
Location: majic-ansible-roles/roles/php_website/templates/nginx_site.j2 - annotation
981584549895
1.0 KiB
text/plain
MAR-5: Adding the initial implementation of the WSGI website role.
7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 7727c37bce67 | server {
listen 80;
root {{ home }}/htdocs/;
index index.php;
server_name {{ fqdn }};
# Site rewrites.
{% for rewrite in rewrites -%}
rewrite {{ rewrite }};
{% endfor %}
# Interpret PHP files via FastCGI.
location ~ \.php($|/) {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php5-fpm/{{ fqdn }}.sock;
}
# Deny access to all hidden files (this will prevent access to
# .htaccess too).
location ~ /\. {
deny all;
}
{% for regex in deny_files_regex -%}
# Deny access to user-specified files.
location ~ {{ regex }} {
deny all;
}
{% endfor %}
{% if php_rewrite_url -%}
# Serve the remaining files directly or rewrite request for PHP processing
# (clean URLs).
location ~ /(.*) {
set $suburi $1;
try_files $uri $uri/ {{ php_rewrite_url }};
}
{% endif %}
access_log /var/log/nginx/{{ fqdn }}-access.log;
error_log /var/log/nginx/{{ fqdn }}-error.log;
}
|