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: Alex Smorodin <agsmorodin@xxxxxxxxx>
  • Date: Wed, 9 Jun 2010 14:42:48 +0300
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=TpWuIN7ukR6Xl3aTV/AqYHHWlAAYDsD9kjf0/LJ1sBE=; b=Hp2iMayuKSgDfbIiDIcLW688v8fu0HiU32d7BQqUDpcPRj/eIHdVY/j7k6RRjnvIKo F/5+hwIaPjejZ93dV78fuTfVxjPU9zN1dsjd5PkueWxSzzx1yRXnsy/tGDnPR8iVO2TS 6k5gTu8sKO2FLsyEDvsgrDcXIDY9yoONFDpmo=
  • 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=nIkG9t6Pu+wJF4EoxD/X7n/Wd6jjA3Nr8RmHM+8EdUYSHAL4snPdT9i8Psst/Div6c lWDD/AaVY9rgjZzKyI2naHdgokWvrMxdcFUxiCqvh/62q5DqgE/XtqKkVxdsbRCAIUeZ j92hWytT1EdwXg8h6OsSGLaqA6xD0u9ELSQ+A=
  • In-reply-to: <20100607130118.GL42873@xxxxxxxxxxxxx>
  • References: <AANLkTimKUoFc0RtD3kIfF-aUk2zYbl9YX7oGfnIl2ieW@xxxxxxxxxxxxxx> <20100607130118.GL42873@xxxxxxxxxxxxx>

˚ ( 0.7.66 0.8.4):
location / {
proxy_pass http://192.168.0.32:81;
proxy_set_header Host domain.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_next_upstream error timeout invalid_header http_500 http_503;
proxy_cache one;
proxy_no_cache $cookie_session;
proxy_cache_key "$request_method|$is_args|$host|$request_uri|$cookie_session";
proxy_hide_header Set-Cookie;
proxy_pass_header Set-Cookie;
proxy_ignore_headers "Cache-Control" "Expires";
proxy_cache_valid 200 301 302 304 1h;
}
location ~ (^/(page1|page2)) {
proxy_pass http://192.168.0.32:81;
proxy_set_header Host domain.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_next_upstream error timeout invalid_header http_500 http_503;
proxy_cache off;
}
proxy_hide_headers Set-Cookie - session , ( ). proxy_path_header Set-Cookie - , Ś . , , . .
session Ś . "Set-Cookie: SESSION=c6070942bd95129dff2f34271169a226
no_cache $cookie_session .
.
7 2010 . 16:01 Igor Sysoev <igor@xxxxxxxxx> :
On Mon, Jun 07, 2010 at 03:06:54PM +0300, Alex Smorodin wrote:

> . ubuntu 2.6.27-11-generic,nginx version: nginx/0.7.65.
> nginx. post ,
> session, c,
> , . :
> ,
> "proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;".
> , . , ?
> proxy_cache_key session,
> ( ).
> :
> server {
> listen 192.168.0.32:9081;
> server_name domain.com;
> access_log /var/log/nginx/domain.com/nginx-access.log combined;
> error_log /var/log/nginx/domain.com/nginx-error.log error;
> proxy_temp_path /var/cache/nginx/domain.com;
> location @nocached {
> proxy_pass http://192.168.0.32:81;<http://192.168.0.32:81/;>
> proxy_set_header Host domain.com;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> }
> location / {
> proxy_pass http://192.168.0.32:81;<http://192.168.0.32:81/;>
> proxy_set_header Host domain.com;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_next_upstream error timeout invalid_header http_500
> http_503;
> if ($cookie_session) {
> 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|$cookie_session";
> proxy_hide_header "Set-Cookie";
> proxy_ignore_headers "Cache-Control" "Expires";
> proxy_cache_valid 200 301 302 304 1h;
> }
> }

0.8.40 :

server {
listen 192.168.0.32:9081;
server_name domain.com;
access_log /var/log/nginx/domain.com/nginx-access.log combined;
error_log /var/log/nginx/domain.com/nginx-error.log error;
proxy_temp_path /var/cache/nginx/domain.com;

location / {
proxy_pass http://192.168.0.32:81;
proxy_set_header Host domain.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_next_upstream error timeout invalid_header http_500 http_503;
proxy_cache one;
proxy_no_cache $cookie_session;
proxy_cache_key domain.com$uri?$args;
proxy_hide_header "Set-Cookie";
proxy_ignore_headers "Cache-Control" "Expires";
proxy_cache_valid 200 301 302 304 1h;
}
}


--

http://sysoev.ru

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



--
,


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

  • Follow-Ups:
    • Re:
      • From: Igor Sysoev
  • References:
      • From: Alex Smorodin
    • Re:
      • From: Igor Sysoev

 




Copyright © Lexa Software, 1996-2009.