Welcome! Log In Create A New Profile


Разный proxy_pass в зависимости от $http_referer

January 13, 2010 07:35PM
Цель: в зависимости от referer перенаправить запрос.
location / {
set $ups 'http://login:80/';
if ($http_referer ~* "^http://(.*)/fw-in/(.*)$" ) {set $ups 'http://in:80/';}
if ($http_referer ~* "^http://(.*)/webrelay/(.*)$" ) {set $ups 'http://web:80/';}
proxy_pass $ups;
# this line is 258, the next is 259
proxy_redirect default;
proxy_set_header X-Real-IP $remote_addr;

"proxy_rewrite_location default" must go after the "proxy_pass" directive in /etc/nginx/conf/nginx.conf:259
Вопрос: где я не прав?
Заранее спасибо!
PS это в server {...} с ssl;
Subject Author Posted

Разный proxy_pass в зависимости от $http_referer

lazutov January 13, 2010 07:35PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

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