Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: upstream и Host header
- To: nginx-ru <nginx-ru@xxxxxxxxx>
- Subject: Re: upstream и Host header
- From: Daniel Podolsky <onokonem@xxxxxxxxx>
- Date: Sat, 24 Aug 2013 19:16:24 +0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=7UB4kqqYqh9766WzqBxSc2WJPmmisyVW/YL2YthZEKM=; b=M2TyCH66pdW/QGVAuz0F5hPCY+xD1eaBv9lvUbJJa7OZJtA5+h418ShaqKfN7iE+aK 4wil7rrzy869Bn19BYT/gj4eS1f6EoNd8DKDXU/HOfMWuC70RzkUHhVZbDAyP14pyCtd Pq2iPrFGuBohHnxI3NJxXMYbsdoAOtUpZOrukFjusm6g9/tG4CjUeOfd6mX8F31x24zQ icp3i62cORebO3yOr/rm+PLuqIjaeR6o8rjNezF+PZHyxj3wLKntSbT4WJ57nuipo2KN j6S6bhFmb/GsHxDJtmzUxakNTfbQdic5bM5W6FKQ0LLacW1v4qY8pG6DGmfn1dkpPNmq DLpQ==
- In-reply-to: <4de5a54c6625c07b3ee4fb4930d9cc13.NginxMailingListRussian@forum.nginx.org>
- References: <CAFHpkQGMDXNNQfk3E46=Ri33OStr7LRR76UCXRFRLGn1gdTivQ@mail.gmail.com> <4de5a54c6625c07b3ee4fb4930d9cc13.NginxMailingListRussian@forum.nginx.org>
> Бэкэнду нужен правильный Host и, как я уже писал выше, у меня нет к нему
> доступа.
вам точо нужно проксирование, а не редирект 302?
если точно, то можно сколхозить схему с двойным проксированием
upstream cdn {
server 127.0.0.1:port1;
server 127.0.0.1:port2;
server 127.0.0.1:port3;
}
server {
listen 127.0.0.1:port1;
location / {
proxy_pass http://host1;
proxy_set_header Host host1;
}
}
server {
listen 127.0.0.1:port2;
location / {
proxy_pass http://host2;
proxy_set_header Host host2;
}
}
server {
listen 127.0.0.1:port3;
location / {
proxy_pass http://host3;
proxy_set_header Host host3;
}
}
location /test {
proxy_pass http://cdn;
}
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru
|