ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Как запретить отдачу фа йлов из location?


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: Как запретить отдачу фа йлов из location?
  • From: Евгений Григоренко <partizan4ik@xxxxxxxxx>
  • Date: Thu, 20 Jan 2011 00:02:11 +0600
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=GZCMEgrPskZ9B5YwSxIaKFf38mAfmosaBWANIf+YDrU=; b=l5/OGkKYdiSrSFqEh72NQNMBa6QrJOK69sfHLPGaqWW2D6UTQfxzjtgIo+KpAkmvcF S5oDYf64na0IUcR/fsKox57y0CSUhbC6piDbp+zxrxqvMFeYVkbTklR0pKebWWIJQqq/ kdrhhw6CHDRQctGxIxNeDuXaIFiFC/RVH08Zg=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=h+nOmKOvRPrSFp31AB3a5naXUvr4oQnFylmJPCKLVzI44EUBQm4cPGswOHtbY6nSBF Fy7C82BDMa/nEQ6A3c1ePgVguAz4wssR3ASjfRnhuScCoQltfFlzTpuK+8sQLxKNYJVI /ZCWnBk2lTqujEZynWGyoGBhGpAO0nkMudX0Y=
  • In-reply-to: <AANLkTik5BDpp0_4TGKEDtqE-3Be1yAc_hX8qyW6Uhanh@xxxxxxxxxxxxxx>
  • References: <AANLkTik5BDpp0_4TGKEDtqE-3Be1yAc_hX8qyW6Uhanh@xxxxxxxxxxxxxx>

root /www;
location ^~ /folder/ {?
??return 403;
??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

_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.