Welcome! Log In Create A New Profile

Advanced

comet бэкенды и location /

October 25, 2011 05:23AM
Hi!

Есть у меня несколько comet бэкендов,

upstream comet_be {
server comet_be1 :7045;
server comet_be2 :7045;
}

upstream main_be {
server main_be1:80;
}


#root

location /
{
proxy_pass http://main_be;
}


#описаны как:

location ~* ^/cm-.* {
proxy_pass http://comet_be;

server_name_in_redirect off;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_next_upstream error timeout;

proxy_max_temp_file_size 0;

client_max_body_size 10m;
client_body_buffer_size 128k;

proxy_buffering off;
}

Так вот. Запрос обрабатывается в location ~* ^/cm-.*, однако, если оба комет сервера лежат, запрос после 2-х connection refused, уходит на location / чего бы не хотелось (nginx 1.0.8). То-есть, получается что location не валидный и nginx использует /. Однако, как мне просто отдать клиенту ошибку и не пытаться использовать / location?


access.log ($upstream_addr):
10.0.0.10:7045 : 10.0.0.11:7045 : 10.0.0.254:80

---
Igor
Subject Author Posted

comet бэкенды и location /

igor.goncharenko October 25, 2011 05:23AM

Re: comet бэкенды и location /

igor.goncharenko October 25, 2011 05:40AM

Re: comet бэкенды и location /

Igor Sysoev October 25, 2011 06:42AM

Re: comet бэкенды и location /

igor.goncharenko October 25, 2011 07:22AM

Re: comet бэкенды и location /

Igor Sysoev October 25, 2011 08:22AM

Re: comet бэкенды и location /

Maxim Dounin October 25, 2011 08:54AM

Re: comet бэкенды и location /

igor.goncharenko October 25, 2011 09:43AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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