ðòïåëôù 


  áòèé÷ 


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: ëÜÛÉÒÏ×ÁÎÉÅ × nginx


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: ëÜÛÉÒÏ×ÁÎÉÅ × nginx
  • From: Yuriy Taraday <yorik.sar@xxxxxxxxx>
  • Date: Tue, 18 May 2010 10:53:01 +0400
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=qa01c1vSno4K0tcrRMVhx5s6TSDzTSp6h5+LnY3JXmw=; b=woUDiU+nNiwloIOc/L62I4ktZ2VViR6iVuiCj3R1mdzeFTXl+JlvUfY2xFNRbx4Anv w08n4QEDOBfOWxNo9g9uFf1kvN1ebx83/jY7BSwK0c3xClLyzLl43HdBkEYbpJKqqTmc N+fcD9lwD8S20/1jcT5UZ1SinfkBETCKgrppc=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=nDrlHhI0iRGbZhExxbGkG080HusBB3+q8pQYqvaqXWYcOwVc8WhCOlapMJBbGiurYS y8ksRo61kC3RMiu+6gvMGn9eXRRmQgwk0bEiWoCQpWxulvUz0w3QfDBzSpMJl2UYPXSC LlFMhL17eI3tOBcKQOHhzbC0HvfhLzONF88S8=
  • In-reply-to: <1b8ee237be25a3b095f3a107ac2bf5cc.NginxMailingListRussian@xxxxxxxxxxxxxxx>
  • References: <1b8ee237be25a3b095f3a107ac2bf5cc.NginxMailingListRussian@xxxxxxxxxxxxxxx>

ëÁË ÓÌÅÄÕÅÔ ÉÚ ÔÅËÓÔÁ ÏÛÉÂËÉ, ÎÅÔ location @nocached, ÎÁ ËÏÔÏÒÕÀ
ÓÓÙÌÁÅÔÅÓØ × ÓÔÒÏÞËÅ "error_page 412 = @nocached;".

2010/5/18 ower <nginx-forum@xxxxxxxx>:
> úÄÒÁ×ÓÔ×ÕÊÔÅ.
>
> ðÏÐÒÏÂÏ×ÁÌ ÓÄÅÌÁÔØ ×ÏÔ ÔÁËÏÊ ËÏÎÆÉÇ ÄÌÑ nginx ÎÁ Ó×ÏÅÍ VPS, ÎÏ ÐÒÉ ÚÁÐÕÓËÅ ÎÁ 
> ÎÅÍ ×ÙÓËÁËÉ×ÁÅÔ ÏÛÉÂËÁ 504 nginx. ÷ ÌÏÇÅ nginx ÏÛÉÂËÉ ÔÁËÏÇÏ ÒÏÄÁ:
>
> 2010/05/18 09:41:12 [error] 15597#0: *39 could not find named location 
> "@nocached", client: 94.246.127.88, server: example.com, request: "GET / 
> HTTP/1.1", host: "example.com"
> 2010/05/18 09:41:22 [error] 15597#0: *49 could not find named location 
> "@nocached", client: 195.93.155.18, server: example.com, request: "GET / 
> HTTP/1.1", host: "example.com"
>
> É ÔÁË ÄÁÌÅÅ.... îÁ ×ÓÅ ÐÁÐËÉ /var/cache/nginx/ É ×ÎÕÔÒÉ ÎÅÅ ÐÒÁ×Á nginx 
> ×ÙÓÔÁ×ÌÅÎÙ - 700. ðÏÄÓËÁÖÉÔÅ, ÞÔÏ ÎÅ ÔÁË, ÎÅ ÍÏÇÕ ÐÏÎÑÔØ...
>
> š š š šhttp {
>
> š šproxy_cache_path /var/cache/nginx/cache levels=1:2 keys_zone=one:16m 
> inactive=7d max_size=1024m;
> š šproxy_temp_path /var/cache/nginx/temp;
>
> š š š šserver {
> š š š š š š š šset $cached 0;
> š š š š š š š šlisten backend:80;
> š š š š š š š šserver_name example.com www.example.com;
> š š š š š š š šrewrite ^(/manager/.*)$ https://$host$1 permanent;
> š š š š š š š šproxy_temp_path /var/cache/nginx/example.com;
>
> š š š š š š š šlocation ~* ^/(webstat/|awstats|webmail/|myadmin/|manimg/) {
> š š š š š š š š š š š šproxy_pass http://backend:8080;
> š š š š š š š š š š š šproxy_redirect off;
> š š š š š š š š š š š šproxy_set_header Host $host;
> š š š š š š š š š š š šproxy_set_header X-Forwarded-For 
> $proxy_add_x_forwarded_for;
> š š š š š š š š š š š šproxy_set_header X-Real-IP $remote_addr;
> š š š š š š š š}
> š š š š š š š šlocation / {
> š š š š š š š š š š š šproxy_pass http://backend:8080;
> š š š š š š š š š š š šproxy_redirect off;
> š š š š š š š š š š š šproxy_set_header Host $host;
> š š š š š š š š š š š šproxy_set_header X-Forwarded-For 
> $proxy_add_x_forwarded_for;
> š š š š š š š š š š š šproxy_set_header X-Real-IP $remote_addr;
> š š š š š š#ÚÄÅÓØ ÍÙ ÆÉÌØÔÒÕÅÍ ÎÁÛÉÈ ÚÁÌÏÇÉÎÅÎÙÈ ÐÏÌØÚÏ×ÁÔÅÌÅÊ
> š š š š š šif ($cookie_dle_user_id) { return 412; }
> š š š š š šif ($cookie_dle_password) { return 412; }
> š š š š š šif ($request_method = POST ) {
> š š š š š šreturn 412;
> š š š š}
> š š š š š šerror_page 412 = @nocached;
> š š š š š šproxy_cache one;
> š š š š š šproxy_cache_key "$request_method|$is_args|$host|$request_uri";
> š š š š š šproxy_hide_header "Set-Cookie";
> š š š š š šproxy_ignore_headers "Cache-Control" "Expires";
> š š š š š šproxy_cache_valid 200 302 304 5m;
> š š š š š šproxy_cache_valid 301 1h;
> š š š š š šproxy_cache_valid 503 4s;
> š š š š š šproxy_cache_valid any 1m;
> š š š š š šproxy_cache_use_stale http_502 http_503 http_504;
> š š š š š š š š}
> š š š šlocation ~ (sumiks.php|admin.php|index.php?action=logout) {
> š š š š š šproxy_pass http://backend:8080;
> š š š š š šproxy_redirect off;
> š š š š š šproxy_set_header Host $host;
> š š š š š šproxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> š š š š š šproxy_set_header X-Real-IP $remote_addr;
> š š š š}
> š š š š š š š šlocation ~* 
> ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar)$ {
> š š š š š š š š š š š šroot /var/www/example/data/www/example.com;
> š š š š š šexpires 1y;
> š š š š š š š š š š š šaccess_log /var/www/httpd-logs/example.com.access.log;
> š š š š š š š š š š š šerror_page 404 = @fallback;
> š š š š š švalid_referers š none šblocked šserver_names
> š š š š š š~\.google\.
> š š š š š š~\.yandex\.
> š š š š š š~\.images.yandex\.
> š š š š š š~\.yahoo\.
> š š š š š š~\.marketgid\.
> š š š š š š~\.msn\.
> š š š š š š~\.altavista\.
> š š š š š š~\.rambler\.
> š š š š š š~\.mail\.
> š š š š š š~\.gogo\.
> š š š š š š~\.aport\.
> š š š š š š~\.bing\.
> š š š š š š~\.poisk\.
> š š š š š š~\.conduit\.
> š š š š š š~\.nigma\.
> š š š š š š~\.icq\.
> š š š š š š~\.qip\.
> š š š š š š~\.liveinternet\.
> š š š š š š~\.tut\.
> š š š š š š~\.rss2email.ru\.
> š š š š š š~\.rsslenta.ru\. ;
> š š š š š šif ($invalid_referer) {
> š š š š š šreturn š 403;
> š š š š š š š š}
> š š š š š š š š}
> š š š š š š š šlocation @fallback {
> š š š š š š š š š š š šproxy_pass http://backend:8080;
> š š š š š š š š š š š šproxy_set_header Host $host;
> š š š š š š š š š š š šproxy_set_header X-Forwarded-For 
> $proxy_add_x_forwarded_for;
> š š š š š š š š š š š šproxy_set_header X-Real-IP $remote_addr;
> š š š š š š š š}
> š š š š}
>
> Posted at Nginx Forum: 
> http://forum.nginx.org/read.php?21,87654,87654#msg-87654
>
>
> _______________________________________________
> 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.