atom feed2 messages in ru.sysoev.nginxRe: Possible to create seperate loggi...
FromSent OnAttachments
David TaverasMar 22, 2010 1:30 pm 
Arvind JayaprakashMar 28, 2010 2:40 am 
Subject:Re: Possible to create seperate logging for objects fetched to upstream in reverse proxy mode?
From:Arvind Jayaprakash (wo@anomalizer.net)
Date:Mar 28, 2010 2:40:29 am
List:ru.sysoev.nginx

On Mar 22, David Taveras wrote:

Iam running a reverse proxy.. works great. I was diferrentiating objects that served locally because they have a 0.00 processing time.. versus the objects that are fetched from the upstream... however i now see that this isnt at all true!

Sometimes in my SSL server i fetch files from cache that actually take 1.10 .. (maybe due to the ssl handshake) .. so I dont really have a way of knowing which files are actually fetched from the upstream.

Is it possible to set a log for requests made to the upstream only?

Have you tried logging this variable? http://wiki.nginx.org/NginxHttpUpstreamModule#.24upstream_addr

For requests that were not sent to an upstream, a dash i.e. "-" gets logged.

$upstream_cache_status might also be of interest if you are using nginx caching