Welcome! Log In Create A New Profile

Advanced

Multiple proxy_pass destinations from a single location block

February 04, 2015 04:11AM
Is it possible to specify multiple proxy_pass destinations from a single location block? Currently we have:

location ~ ^/v1/?(?<url>.+)? {
resolver 208.67.222.222 208.67.220.220 valid=300s;
resolver_timeout 10s;
proxy_intercept_errors off;
proxy_hide_header Vary;
proxy_set_header Host "foo.mydomain.io";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass https://foo.mydomain.io/api/$url;
proxy_connect_timeout 10s;
proxy_read_timeout 60s;
proxy_ssl_session_reuse on;
proxy_ssl_trusted_certificate /etc/pki/tls/certs/ca-bundle.crt;
proxy_ssl_verify on;
proxy_ssl_verify_depth 2;
proxy_ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS";
}

I'd like to keep all the above logic, but ALSO set up another proxy_pass from this location block to say bar.mydomain.com. What is the best way to do this?
Subject Author Posted

Multiple proxy_pass destinations from a single location block

justink101 February 04, 2015 04:11AM

Re: Multiple proxy_pass destinations from a single location block

Igor Sysoev February 04, 2015 04:20AM

Re: Multiple proxy_pass destinations from a single location block

justink101 February 05, 2015 03:26AM

Re: Multiple proxy_pass destinations from a single location block

Igor Sysoev February 05, 2015 07:40AM

Re: Multiple proxy_pass destinations from a single location block

AmitChauhan March 13, 2015 06:16AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 147
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready