Welcome! Log In Create A New Profile

Advanced

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

January 14, 2010 11:45AM
Благодарю за комментарии!
Но...
[code]
Starting nginx: [emerg]: "proxy_pass" may not have URI part in location given by regular expression, or inside named location, or inside the "if" statement, or inside the "limit_except" block in /etc/nginx/conf/nginx.conf:285
[/code]

[code]
location / {

if ($http_referer ~* "https://(.*)/fw-in/(.*)$" ) { return 412;}
if ($uri ~* "^/fw-in(.*)$" ) {return 412;}
error_page 412 =@in;
# default
autoindex on;
root /home/lazutov/default;
index index.html index.htm;
include /etc/nginx/conf/vhost.conf;

add_header X-forward-ups ssl-none;
add_header X-forward-rfr $http_referer;
add_header X-forward-uri $uri;
}

location @in {
proxy_pass http://new.qwerty.name:80/;
proxy_redirect default;
proxy_set_header X-Real-IP $remote_addr;
add_header X-qwerty-forward-ups ssl-dns;
}
[/code]

Где я недопонял?
PS add_header - для хоть какой-то отладки; v0.7.64
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: 48
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