ðòïåëôù 


  áòèé÷ 


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: 0.6.38 proxy_redirect ÎÅ ÓÒÁÂÁÔÙ×ÁÅ Ô


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: 0.6.38 proxy_redirect ÎÅ ÓÒÁÂÁÔÙ×ÁÅ Ô
  • From: Ivan Kovalenko <kig@xxxxxxxxxx>
  • Date: Fri, 18 Sep 2009 11:37:54 +0400
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to :content-type:content-transfer-encoding; bh=3yL5jMTwnxvvXdyVYgdRGHoUR/2g2/2iSfpiq2nFZsI=; b=j9qoLCsG3sT/9xk90DbhEZY6WwE/OgLQ9XbEuyxWOQFg24c/kN3dmb1R298CQZmy3K He65NMVj8yIUf4h/mlsrEfM7USCE2QK+n/KJtf3V+muKY1BM1gLfFVRPqQYUZwt/Ld5R 5NS3BXPgy+inJnhKxJy98Lp4Kx1o8MXQ9r7Nw=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; b=r15DJcMaz5fxDzakE7HMksSvKMTsVUu2VBs0Tenb6Sn2J0QxI4VoKiXb4pLvvsaHLH ryEGFqNcVcT/it8DxbAYriDh10QT+ClzRwXRG+rZT6dKY4UzLdTWhkvFWv6r8UmF4YDP zFFgIBW3iIXeQ7fqQJn8D5gIJvkujKBlxR6SM=
  • In-reply-to: <20090917130201.GB20282@xxxxxxxxxxxxxxxxx>
  • References: <20090917130201.GB20282@xxxxxxxxxxxxxxxxx>

÷ÐÒÏÞÅÍ, ÐÏÎÑÔÎÏ ÐÏÞÅÍÕ ÎÅ ÓÒÁÂÁÔÙ×ÁÅÔ - rewrite ÉÄÅÔ ÂÕË×ÁÌØÎÙÊ. é
hostname ËÏÔÏÒÙÊ ÐÒÉÈÏÄÉÔ ÉÚ Location ÎÅ ÚÁÍÅÎÑÅÔÓÑ ÅÓÌÉ ×
proxy_redirect ÉÝÅÔÓÑ ip (ÎÅÏÖÉÄÁÎÎÏ, ÐÒÁ×ÄÁ?). ÷ÏÏÂÝÅ ËÏÎÅÞÎÏ
ÉÎÔÕÉÔÉ×ÎÏ ÈÏÞÅÔÓÑ ÞÔÏÂÙ ÍÏÖÎÏ ÂÙÌÏ ÚÁÍÅÎÑÔØ × Location ÓÔÒÏËÕ ÎÁ
ÓÔÒÏËÕ. ÔÉÐÁ ÕÂÒÁÔØ ÐÏÒÔ ÎÁÐÒÉÍÅÒ, ÉÌÉ ip ÐÅÒÅÚÁÐÉÓÁÔØ. ðÌÀÓ ËÏÎÅÞÎÏ
ÐÅÒÅÍÅÎÎÙÅ ÉÓÐÏÌØÚÏ×ÁÔØ - ÎÁÐÒÉÍÅÒ $host.

17 ÓÅÎÔÑÂÒÑ 2009 Ç. 17:02 ÐÏÌØÚÏ×ÁÔÅÌØ  <kig@xxxxxxxxxx> ÎÁÐÉÓÁÌ:
> îÅ ÓÏ×ÓÅÍ ÐÏÎÑÔÎÏ ÐÏÞÅÍÕ, ÎÏ ×ÒÏÄÅ ÎÅ ÓÒÁÂÁÔÙ×ÁÅÔ proxy_redirect
> óÕÄÑ ÐÏ ËÏÎÆÉÇÕ ÄÏÌÖÎÏ ÖÅ ×ÒÏÄÅ ÐÅÒÅÐÉÓÁÔØ.
>
> nginx version: nginx/0.6.38
> built by gcc 4.1.2 20080704 (Red Hat 4.1.2-44)
> configure arguments: --user=nginx --group=nginx --prefix=/usr/share/nginx 
> --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf 
> --error-log-path=/var/log/nginx/error.log 
> --http-log-path=/var/log/nginx/access.log 
> --http-client-body-temp-path=/var/lib/nginx/tmp/client_body 
> --http-proxy-temp-path=/var/lib/nginx/tmp/proxy 
> --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi 
> --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx 
> --with-http_ssl_module --with-http_realip_module --with-http_addition_module 
> --with-http_sub_module --with-http_dav_module --with-http_flv_module 
> --with-http_gzip_static_module --with-http_stub_status_module 
> --with-http_perl_module --with-mail --with-mail_ssl_module --with-cc-opt='-O2 
> -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
> --param=ssp-buffer-size=4 -m64 -mtune=generic' 
> --add-module=/builddir/build/BUILD/nginx-0.6.38/nginx-upstream-fair
>
> šserver {
> š š š šlisten somehost:80;
> š š š š#access_log off;
> š š š šlocation / {
> š š š š š š š šproxy_set_header Host $host;
> š š š š š š š šproxy_set_header X-Real-IP $remote_addr;
> š š š š š š š šproxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> š š š š š š š šproxy_redirect http://somehost:18000/ http://$host/;
> š š š š š š š šproxy_pass http://somehost:18000/;
> š š š š}
> š š š šerror_page š 500 502 503 504 š/50x.html;
> š š š šlocation = /50x.html {
> š š š š š šroot š html;
> š š š š}
> š š š šinclude conf.d/nginx-status.conf;
> š š}
>
> --17:01:09-- šhttp://somename/forum
> Resolving somename... somehost
> Connecting to somename|somehost|:80... connected.
> HTTP request sent, awaiting response...
> šHTTP/1.1 301 Moved Permanently
> šServer: nginx/0.6.38
> šDate: Thu, 17 Sep 2009 13:01:09 GMT
> šContent-Type: text/html; charset=iso-8859-1
> šConnection: close
> šLocation: http://somename:18000/forum/
> Location: http://somename:18000/forum/ [following]
> --17:01:09-- šhttp://somename:18000/forum/
> Connecting to somename|somehost|:18000... connected.
> HTTP request sent, awaiting response...
> šHTTP/1.1 200 OK
> šDate: Thu, 17 Sep 2009 13:01:09 GMT
> šServer: Apache
> šCache-Control: private, pre-check=0, post-check=0, max-age=0
> šExpires: 0
> šPragma: no-cache
> šX-Powered-By: PHP/5.2.9
> šSet-Cookie: 
> phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A0%3A%22%22%3Bs%3A6%3A%22userid%22%3Bi%3A-1%3B%7D;
>  expires=Fri, 17-Sep-2010 13:01:09 GMT; path=/
> šSet-Cookie: phpbb2mysql_sid=f19fb7c530519378f52dffd5eeeac24a; path=/
> šKeep-Alive: timeout=15, max=100
> šConnection: Keep-Alive
> šContent-Type: text/html
> Length: unspecified [text/html]
> 200 OK
>
>


 




Copyright © Lexa Software, 1996-2009.