Здравствуйте!
Цель: в зависимости от referer перенаправить запрос.
[code]
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;
}
[/code]
Результат:
[code]
"proxy_rewrite_location default" must go after the "proxy_pass" directive in /etc/nginx/conf/nginx.conf:259
[/code]
Вопрос: где я не прав?
Заранее спасибо!
PS это в server {...} с ssl;