Quantcast
Viewing all articles
Browse latest Browse all 3102

Re: Необычный proxy pass (no replies)

On Mon, 25 Jul 2016, skeletor wrote:

> Всем привет.

Добрый вечер!

> Нужно сделать необычный proxy_pass:
> - http://domain.com -> http://domain2.com/someURI
> - http://domain.com/URI -> http://domain2.com/URI
>
> пробовал банально:
>
> location / {
> proxy_pass http://domain2.com/someURI;
> }
>
> но тогда не открываются часть css (отдают 502).

Предполагая, что вам надо только главную страницу проксировать в другое
место, конфиг будет примерно таким:

location = / {
proxy_pass http://domain2.com/someURI;
}
location / {
proxy_pass http://domain2.com/URI;
}


> Чувствую, что может помочь proxy_redirect, но не въезжаю как именно.

proxy_redirect помогает лишь когда ваш бэкенд отдаёт "не то" имя сервера в
заголовке "Location".


--
Best regards,
Andrey Kopeyko <andrey@kopeyko.ru>
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Viewing all articles
Browse latest Browse all 3102

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>