Hi, > Hello! > > On Sun, Aug 10, 2014 at 05:24:04PM -0700, Robert Paprocki wrote: > > > Any options then to support an architecture with multiple nginx > > nodes sharing or distributing a proxy cache between them? i.e., > > a HAProxy machine load balances to several nginx nodes (for > > failover reasons), and each of these nodes handles http proby ThomasLohner - Nginx Mailing List - English
oh my... i was fooled by $request_uri which returns the parent uri. i understand that this is intended behavior. sorry!by ThomasLohner - Nginx Mailing List - English
Hi there, i'm having trouble getting the request_uri via lua in a subrequest. ngx.var.uri will always return the uri of the parent request whereas something like ngx.req.get_uri_args will return the correct args for the subrequest. any ideas on how to get the subrequets uri? or am i missing something here? i'm using 1.4.1, thanks in advance Thomasby ThomasLohner - Nginx Mailing List - English
Yeah! Thanks, maybe you should add to the wiki, that "if" is executed before proxy_pass ;-) Anyways, thank you very much for this helpful answer, it works this way. obviously the map has to be the other way around, so if anyone finds this.. the correct way for caching only if upstream sets a custom header is: map $upstream_http_myheader $nocache { default 1; 1 0; } proxy_nby ThomasLohner - Nginx Mailing List - English
Hi, i know how to *prevent* caching if custom headers are set by upstream with proxy_cache_bypass and proxy_no_cache. This time i'd like to do the opposite, i want the response to be cached *only* if a custom header is present. I tried something like: set $nocache 1; proxy_no_cache $nocache; ... if ($upstream_http_myheader = 1) { set $nocache 0; } But this doesn't wby ThomasLohner - Nginx Mailing List - English
try this: proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Forwarded-Server ssl; proxy_set_header HTTPS 1; and then let the app ask for one of these headers.by ThomasLohner - Nginx Mailing List - English