Welcome! Log In Create A New Profile

Advanced

Re: Разный proxy pass в зависимости от $http referer

Maxim Dounin
January 14, 2010 08:26AM
Hello!

On Thu, Jan 14, 2010 at 03:58:06PM +0300, Maxim Dounin wrote:

> Hello!
>
> On Thu, Jan 14, 2010 at 03:38:41PM +0300, Борис Долгов wrote:
>
> > Насколько я понима, очередные проблемы с if.
>
> Нет, просто proxy_redirect default не дружит с proxy_pass
> использующим переменные.

Патч, исправляющий сообщения об ошибках.

Maxim Dounin
# HG changeset patch
# User Maxim Dounin <mdounin@mdounin.ru>
# Date 1263475311 -10800
# Node ID c003006f3f03505d329411b58db5c515d19de5b8
# Parent 5cc739cb96a7c5742d3b96415cafa8ef44afd1a4
Proxy: fix error messages for proxy_redirect default.

diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -2754,9 +2754,16 @@ ngx_http_proxy_redirect(ngx_conf_t *cf,
}

if (ngx_strcmp(value[1].data, "default") == 0) {
+ if (plcf->proxy_lengths) {
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "\"proxy_redirect default\" may not be used "
+ "with \"proxy_pass\" with variables");
+ return NGX_CONF_ERROR;
+ }
+
if (plcf->url.data == NULL) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
- "\"proxy_rewrite_location default\" must go "
+ "\"proxy_redirect default\" must go "
"after the \"proxy_pass\" directive");
return NGX_CONF_ERROR;
}
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

Re: Разный proxy pass в зависимости от $http referer

Boris Dolgov January 14, 2010 07:40AM

Re: Разный proxy pass в зависимости от $http referer

Maxim Dounin January 14, 2010 08:00AM

Re: Разный proxy pass в зависимости от $http referer

Maxim Dounin January 14, 2010 08:26AM

Re: Разный proxy pass в зависимости от $http referer

Alex Vorona January 14, 2010 08:20AM

Re: Разный proxy pass в зависимости от $http referer

lazutov January 14, 2010 11:45AM

Re: Разный proxy pass в зависимости от $http referer

Maxim Dounin January 14, 2010 12:06PM

Re: Разный proxy pass в зависимости от $http referer

lazutov January 14, 2010 12:51PM

Re: Разный proxy pass в зависимости от $http referer

lazutov January 14, 2010 03:49PM

Re: Разный proxy pass в зависимости от $http referer

Maxim Dounin January 14, 2010 01:24PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 183
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