Welcome! Log In Create A New Profile

Advanced

Re: proxy_pass

Anton Yuzhaninov
November 22, 2012 06:44AM
On 11/22/12 15:23, talabira wrote:
>
> location/test/
> {
> proxy_passhttp://srv.domain/file.ext;
> }
> Все работает. Нужно добавить переменных что бы файл брался с других
> серверов:
> http://domain/test/srv_1/folder/file.ext
> proxy_passhttp://1.domain/folder/file.ext
>
> То есть необходимо составлять proxy_pass из параметров полученных в урл

location /test/ {
location ~ /test/srv_(\d+)/(.*)$ {
proxy_pass http://$1.domain/$2;
}
}

Для proxy_pass с переменными, нужно указать http://nginx.org/r/resolver

--
Anton Yuzhaninov

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

proxy_pass

talabira November 22, 2012 06:23AM

Re: proxy_pass

Anton Yuzhaninov November 22, 2012 06:44AM

Re: proxy_pass

talabira November 22, 2012 06:48AM

Re: proxy_pass

Daniel Podolsky November 22, 2012 07:18AM

Re: proxy_pass

talabira November 22, 2012 07:20AM

Re: proxy_pass

Daniel Podolsky November 22, 2012 07:36AM

Re: proxy_pass

talabira November 22, 2012 08:35AM

Re: proxy_pass

Andrey Repin November 22, 2012 11:20AM

Re: proxy_pass

Daniel Podolsky November 22, 2012 01:34PM

Re: proxy_pass

Andrey Repin November 22, 2012 03:20PM

Re: proxy_pass

Peter Vereshagin November 22, 2012 04:08PM

Re: proxy_pass

Andrey Repin November 22, 2012 05:36PM

Re: proxy_pass

Peter Vereshagin November 23, 2012 03:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 66
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready