Try_files and proxypass

Hi,

I came across such configs and I am curios to know what @app_$dc;
matches
in location configs?

try_files $uri @app_$dc;

location @app_prod { proxy_pass http://app_prod;}
location @app_qadc { proxy_pass http://app_qadc;}

Thanks
ar

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,260841,260841#msg-260841

On Fri, Aug 07, 2015 at 01:39:05AM -0400, arlin wrote:

Hi there,

I came across such configs and I am curios to know what @app_$dc; matches
in location configs?

try_files $uri @app_$dc;

Presumably somewhere else in the config, $dc is set to either prod or
qadc.

try_files expands variables – for example $uri – before testing.

location @app_prod { proxy_pass http://app_prod;}
location @app_qadc { proxy_pass http://app_qadc;}

It will use whatever location @app_$dc expands to on this request.

f

Francis D. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs