??error_page 404 = @backend;
??location?^~ /folder/file1 { };
??location?^~ /folder/file2 { };
}
???-?? ???? ??????
19 ?????? 2011??. 23:26 ???????????? Max Ivanov
<ivanov.maxim@xxxxxxxxx> ???????:
???? ??????? ???-?? ????? whitelist ?? ????? ? ??? ???? ?? ???????? ??
php ????? ??????? ?????????? (???? ?? ??? ??? ????).
??? ????? ???? ????????? ?????????? ?????? ? location ???? ??? ???? ?
????????? ??????? ?? 404 ???? ?? ???.
location / {
?error_page 404 = @drupal;
?return 403; ?# <--- ??? ??? ?? ????????, ?? ???????????? ?? @drupal ???????
}
location @drupal {
? ?rewrite ^/(.*)$ /index.php?q=$1;
}
location =/index.php {
? ?include /etc/nginx/settings/fastcgi.conf;
? ?fastcgi_pass php_upstream1;
}
#??? ImageCache
location /sites/all/files/imagecache/ {
? ?try_files $uri @drupal;
}
#????????? ????? ????? ?? sites/all/files
location /sites/all/files/ {
}
#????????? js/css/png/ ? ???? ????????, ?.?. ??? ??????????? ? ?????? ???????
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
}
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru