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]

proxy_store/proxy_pass


  • To: nginx-ru@xxxxxxxxx
  • Subject: proxy_store/proxy_pass
  • From: Andrey Zonov <andrey.zonov@xxxxxxxxx>
  • Date: Fri, 13 Mar 2009 13:48:21 +0300
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=8B8nOAf0oKuudT5VNUM9ckbpFpUKtIbOQTKVJteFi2E=; b=Qd2+ME60OKjCEYg/c+L+4h3Qnrr6hGBF2ngN9ayzB3sXM+q0whbE0aYmFThQLcuVBt fAvvHij0wIOtTCK1XGio7r/2u3whlidSPKrdh8I1GIluNZUn5qe1XFAQcx6uDDWv7vrn rEhmh1a1rnfqgfI/cktyGf1hdrTeGicPeHUfA=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=VECEh3jDTiwE+6b7WZn2Q+0rTcm336yHEAJ3wGpE4SRPQj+xxpPUqQaHfshROPLzm4 icmjAS3Sfe8Xkpc7I9uPsuAh9cwvByMpVnuywiVxijn9kWhlFzB41HclygdPRgBC02Cj 4FW5Dua5oJi6DQC6AUu2uWDenzhVloD0yaghw=

 .

        
    nginx-,     
  , ..   .

      - nginx   200,  
,      .
  -   ?
  :     ,  , 
 .

nginx.conf:
...
http {
...
 proxy_connect_timeout 3;
 proxy_buffering on;
 proxy_buffer_size 32k;
 proxy_buffers 32 32k;
 proxy_intercept_errors off;
 proxy_next_upstream error timeout http_500;
 proxy_store_access user:rw group:rw all:r;
 proxy_temp_path /place/nginx/cache/spool 1 2;

 upstream p0 {
 server w1.xxx.ru:5555;
 server w2.xxx.ru:5555;
...
 }
...
 server {
 listen *:80 default;
 server_name localhost;

 #-- main
 location / {
 if ( $request_uri ~
^/img\?id=([0-9])[0-9]*&rep=([0-9]) ) {
 set $hash $1;
 set $rep $2;
 }
 error_page 404 = @try;
 }

 #-- try local file
 location @try {
 root /place/nginx/cache/$rep/$hash;
 access_log /place/nginx/access_$rep.log stat;
 try_files $request_uri @proxy$rep;
 }
 #-- proxy0
 location @proxy0 {
 access_log /place/nginx/access_proxy_$rep.log stat;
 proxy_store
/place/nginx/cache/$rep/$hash$request_uri;
 proxy_pass http://p0;
 }
...
}

  proxy_buffering,  proxy_store    :(

-- 
Andrey Zonov


 




Copyright © Lexa Software, 1996-2009.