From beb97e1ceafad927445a99b5fc5b9b4eda87aa08 Mon Sep 17 00:00:00 2001 From: Ivan Grynenko Date: Sat, 11 Jun 2016 11:23:46 +1000 Subject: [PATCH] Fixes to Nginx config. --- lemp-rhel7/group_vars/all.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/lemp-rhel7/group_vars/all.yml b/lemp-rhel7/group_vars/all.yml index 34bb133..4e0b376 100644 --- a/lemp-rhel7/group_vars/all.yml +++ b/lemp-rhel7/group_vars/all.yml @@ -72,9 +72,9 @@ nginx_vhosts: client_max_body_size: "5m" client_body_timeout: "60" index: "index.php index.html index.htm" - error_page: "" - access_log: "" - error_log: "" + error_page: "403 =404" + access_log: "/var/log/nginx/example_access.log" + error_log: "/var/log/nginx/example_error.log" extra_parameters: | location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; @@ -114,9 +114,16 @@ nginx_vhosts: add_header Cache-Control "public"; add_header X-Cache $upstream_cache_status; } - error_page 403 =404; - location ~ /\. { access_log off; log_not_found off; deny all; } - location ~ ~$ { access_log off; log_not_found off; deny all; } + location ~ /\. { + access_log off; + log_not_found off; + deny all; + } + location ~ ~$ { + access_log off; + log_not_found off; + deny all; + } location ~ /\.ht { deny all; }