ðòïåëôù 


  áòèé÷ 


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


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: ëÜÛÉÒÏ×ÁÎÉÅ
  • From: Anton Kiryushkin <swood@xxxxxxxxxxx>
  • Date: Tue, 28 Jun 2011 11:13:32 +0400
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fotofor.biz; s=google; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=NSA9N/IZQqKLtbzlUoP79ccWOWM+xs/ENZIs2NhEcRQ=; b=fs83jdIfHN0ZxJLHeuJGul9CYUuvNe4cTtyOUuKzMtPlo6TNjPE9+jKc4MFGAGKBel DPGOcuKtUQEjh7zMy62BEtI6IpO77IYoXiDN8awBLqZmHfYdRbgBQL/NjbAsXMZ9TsnK W+ws4EanU1TsKMgLzRMtBy+Tt8awrWPuIZjvY=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=fotofor.biz; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=KSAAkyfGshZx41QqdwJlkcrZCR3PkgowPBwd0xqYVQZmatvJNP6pRzOSFfq2Ckkiu3 7CMW+rCKll2Glx5aeOtAEQ/6cvofNBrTjlPFYvl8Ccpz9qzovVk/aMRfRZg+Whanljtv Sh/SZn3PmU5SCLgSltB7jFodazms5PrJewykw=
  • In-reply-to: <3ddfcc5f0b95bc272520ef67dd992ea5.NginxMailingListRussian@xxxxxxxxxxxxxxx>
  • References: <3ddfcc5f0b95bc272520ef67dd992ea5.NginxMailingListRussian@xxxxxxxxxxxxxxx>

åÓÌÉ ÎÅ ÏÛÉÂÁÀÓØ, ÔÏ ËÁË ÍÉÎÉÍÕÍ ÎÅ È×ÁÔÁÅÔ proxy_buffering.

28 ÉÀÎÑ 2011šÇ. 10:28 ÐÏÌØÚÏ×ÁÔÅÌØ Sib <nginx-forum@xxxxxxxx> ÎÁÐÉÓÁÌ:
úÄÒÁÓÔ×ÕÊÔÅ. ðÒÉ ÉÓÐÏÌØÚÏ×ÁÎÉÉ
ËÏÎÆÉÇÁ, ÓËÒÉÐÔÙ É ÏÔÄÅÌØÎÙÅ ÓÔÒÁÎÉÃÙ
ËÜÛÉÒÕÀÔÓÑ, ÎÏ ×ÏÔ ÓÔÒÁÎÉÃÙ
ÇÅÎÅÒÉÒÕÅÍÙÅ dle ÈÏÔÑ É ËÜÛÉÒÕÀÔÓÑ
(ÓÏÚÄÁÅÔÓÑ ËÜÛ × ÕËÁÚÁÎÏÊ ÄÉÒÅËÔÏÒÉÉ),
ÎÏ ÚÁÐÒÏÓÙ ×ÓÅÇÄÁ ÉÄÕÔ Ë apache,Á ÎÅ
ÂÅÒÕÔÓÑ ÓÔÒÁÎÉÃÙ ÉÚ ËÜÛÁ nginx.

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 {
šlisten 127.0.0.1:80;
šserver_name example.com www.example.com;
šproxy_temp_path /var/cache/nginx/example.com;

šlocation @nocached {
šproxy_pass http://127.0.0.1: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://127.0.0.1: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 ~ (admin.php|index.php?action="" {
šproxy_pass http://127.0.0.1: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|htm|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar)$
{
šroot /var/www/example/data/www/example.com;
šexpires 1y;

š}
š}

Posted at Nginx Forum: http://forum.nginx.org/read.php?21,210651,210651#msg-210651


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



--
Best regards,
Anton Kiryushkin,
š
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.