Welcome! Log In Create A New Profile

Advanced

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

January 01, 2014 02:14PM
Отвечу сам себе. Верный конфиг следующий:

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;

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

image_filter+proxy_pass and 301 (moved permanently) on backend

Sergey Korzhevsky December 26, 2013 02:00PM

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

Sergey Korzhevsky January 01, 2014 02:14PM

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

Jugurtha February 12, 2014 05:39AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 120
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready