Re: image_filter+proxy_pass and 301 (moved permanently) on backend

2014-01-01 Thread Sergey Korzhevsky
Отвечу сам себе. Верный конфиг следующий:

proxy_intercept_errors on;

location ~* "^/photos/(.*)$" {

error_page 301 302 307 =200 @redir;

#любой ДНС
resolver 8.8.8.8
image_filter resize 50 -;
proxy_pass http://$1;
proxy_redirect off;
}

location @redir {
resolver 8.8.8.8

set $newh $upstream_http_location;

image_filter   resize  50 -;

proxy_pass $newh;
}

Причем, строка "set $newh $upstream_http_location;"  необходима. Если сразу
написать 

proxy_pass $upstream_http_location;

то, почему-то, не работает.

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?21,245867,245948#msg-245948

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

Re: image_filter+proxy_pass and 301 (moved permanently) on backend

2014-02-12 Thread Jugurtha
Hello,

Thx Sergey for this tips (solution)

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?21,245867,247452#msg-247452

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