ðòïåëôù 


  áòèé÷ 


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]

$upstream_addr contains name of upstream


  • To: nginx-ru@xxxxxxxxx
  • Subject: $upstream_addr contains name of upstream
  • From: Konstantin Svist <fry.kun@xxxxxxxxx>
  • Date: Sun, 13 Dec 2009 14:12:56 -0800
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type; bh=zSur0/mFjboMOr7Mt+VjYQdLSnK1eydG/gPsyNkeUiA=; b=MD7fFabYFeGAh7GDjVJ7T7JVa/cIxlXWt83H6Rz/5aNL9ForXALHNJ+piRAbBmk2Kv 3O6VGlhu5LmOklXl47uhxBCeI5PIUVSQdbq9i+PPvKaetd7Oxg3ShxBNQ2XH51mLMe+G PL5jqjSNqYBipm8OSX6HaC4IbZr+MQ4fsHHSg=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type; b=S+bGg3tEmbaQkDyY3RVeJ+COl9pBeic8zoD9elB+gzOfNjdNNgVB5OCZH0vTvTqRb0 SmMt3d4nmIo2n95vb8BIx0XWMvFzlQq38suVGr5m0UrHFkGm/C2A6VircrSjl7zjJk/z 7Z1izw9dcDCZMi/ntLHxID9KAhFIvLwqlotPM=

upstream redisxxx {
š server unix:/tmp/redis-http-cache.sock;
š server localhost:6381;
š server localhost:1111;
}

server {
š location / {
ššš ...
ššš redis_pass redisxxx;
ššš error_page 404 500 502 504 = @real-backend;
š }
š location @real-backend {
ššš proxy_pass http://backend
ššš proxy_set_header lastcache $upstream_addr;
š }
}


localhost:1111 ÐÏÒÔ ÚÁËÒÙÔ; Ä×Á ÄÒÕÇÉÈ ÏÄÉÎÁËÏ×ÙÊ ÓÅÒ×ÅÒ, ×ÓÅÇÄÁ ×ÏÚ×ÒÁÝÁÀÔ 404

3 ÚÁÐÒÏÓÁ ÎÁ backend ÐÏËÁÚÙ×ÁÀÔ header:
Lastcache: unix:/tmp/redis-http-cache.sockššš ~ÐÒÁ×ÉÌØÎÏ
Lastcache: 127.0.0.1:1111, 127.0.0.1:6381šššš ~ÐÒÁ×ÉÌØÎÏ
Lastcache: redisxxx ššš ššš ššš ššš ššš ššš š ~ÇÌÀËÁ


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


 




Copyright © Lexa Software, 1996-2009.