Fixes to Nginx config.

pull/63/head
Ivan Grynenko 8 years ago
parent d37da2c09b
commit beb97e1cea
  1. 19
      lemp-rhel7/group_vars/all.yml

@ -72,9 +72,9 @@ nginx_vhosts:
client_max_body_size: "5m" client_max_body_size: "5m"
client_body_timeout: "60" client_body_timeout: "60"
index: "index.php index.html index.htm" index: "index.php index.html index.htm"
error_page: "" error_page: "403 =404"
access_log: "" access_log: "/var/log/nginx/example_access.log"
error_log: "" error_log: "/var/log/nginx/example_error.log"
extra_parameters: | extra_parameters: |
location ~ \.php$ { location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_split_path_info ^(.+\.php)(/.+)$;
@ -114,9 +114,16 @@ nginx_vhosts:
add_header Cache-Control "public"; add_header Cache-Control "public";
add_header X-Cache $upstream_cache_status; add_header X-Cache $upstream_cache_status;
} }
error_page 403 =404; location ~ /\. {
location ~ /\. { access_log off; log_not_found off; deny all; } access_log off;
location ~ ~$ { access_log off; log_not_found off; deny all; } log_not_found off;
deny all;
}
location ~ ~$ {
access_log off;
log_not_found off;
deny all;
}
location ~ /\.ht { location ~ /\.ht {
deny all; deny all;
} }