Доброго дня!
Есть Apache2 + фронтэнд Nginx + Naxsi
Подмогните советом, как сделать так, чтобы отключить модуль Naxsi в заданной директории, например site.ru/administrator
Вот конфиги:
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
client_body_timeout 10;
client_header_timeout 10;
send_timeout 10;
client_body_buffer_size 1K;
client_header_buffer_size 1k;
client_max_body_size 50m;
large_client_header_buffers 2 1k;
limit_conn_zone $binary_remote_addr zone=slimits:5m;
include /etc/nginx/naxsi_core.rules;
include /etc/nginx/mime.types;
default_type application/octet-stream;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
server {
listen 80;
server_name www.site.ru site.ru;
access_log /var/log/nginx/access.log;
location ~* \.(jpg|jpeg|gif|png|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|tar|wav|bmp|rtf|swf|ico|flv|txt|xml|docx|xlsx)$ {
root /var/www/site.ru/;
index index.html index.php;
access_log off;
expires 30d;
server_tokens off;
location / {
include /etc/nginx/naxsi.rules;
include /etc/nginx/site.ru_naxsi.rules;
limit_req zone=one burst=5;
proxy_pass http://127.0.0.1:81/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $remote_addr;
proxy_set_header Host $host;
proxy_connect_timeout 60;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_redirect off;
proxy_set_header Connection close;
proxy_pass_header Content-Type;
proxy_pass_header Content-Disposition;
proxy_pass_header Content-Length;
limit_conn slimits 5;
if ($host !~ ^(site.ru|www.site.ru)$ ) {
return 444;
}
}
}
location /administrator/ {
root /var/www/site.ru;
LearningMode;
SecRulesDisabled;
}
directory index of "/var/www/site.ru/administrator/" is forbidden,