|
|
|
|
áòèé÷ :: nginx-ru
|
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ÐÒÏÂÌÅÍÁ Ó ËÜÛÉÒÏ×ÁÎÉÅÍ
- To: nginx-ru@xxxxxxxxx
- Subject: ÐÒÏÂÌÅÍÁ Ó ËÜÛÉÒÏ×ÁÎÉÅÍ
- From: Alex Smorodin <agsmorodin@xxxxxxxxx>
- Date: Mon, 7 Jun 2010 15:06:54 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=BULXqxMjUhTHQkj9nzJl+ulqwxdWBYNtRX6dvxV+0+A=; b=sGS5Vw19geoBuQQfJleBN7jB8gC2WC6c7qOBsTjFun5/MburIgzWJl20C9ifrFM8cV xOg/iV/aDIpu0ApOfwrD0uRqrpLPE0f1k/2tFOscnHAiC/xtBenBilhRZw8QiekdB5/m vOyoPyFu1Vg6bUrjA3JJkaV0dHxMaY6zWl9NM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=bc7VFk8Q5zcbTM6sUKdvfReOFgEX9L+3GUVrTJGJOeWf/N5THFmN51H/TOLd85462N YQHhLHM2Fvd1S8+ILsWj699wesQk18+i1BGUotOBTqPFkBAR9bS0FJXOfjhel/QjtSQn P4T/pvPcRu3Y4qdWhMTJRjtF0+Kx6gs/SwrHo=
äÏÂÒÙÊ ÄÅÎØ.šš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; šššššššššššššššš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; šššššššššššššššš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; šššššš } } úÁÒÁÎÅÅ ÓÐÁÓÉÂÏ.
-- ó Õ×ÁÖÅÎÉÅÍ, óÍÏÒÏÄÉÎ áÌÅËÓÁÎÄÒ š š š š š š š š š š š š š šmailto: agsmorodin@xxxxxxxxx
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|
|
|