With the setup:

 

SSL traffic > nginx > Varnish (for load balancing) > Backend Apache

Non-SSL traffic > Varnish > Backend Apache

varnishncsa with a custom log format

 

For non-SSL traffic, the IP of the originating request gets logged by
varnishncsa as %h; for the SSL traffic it's 127.0.0.1. I can pass the IP
from nginx in the X-Forwarded-For header and pick it up in varnishncsa as
%{X-Forwarded-For}i. I'd like to log the contents of %{X-Forwarded-For}i if
it exists, *OR* %h if it doesn't. Seemingly, the -f command line argument
will enable this, but not with a custom format set with the -F flag. This
generates the warning "-f and -F can not be combined". Is there a way around
this?

_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to