Varnish purge behind nginX proxy

Per Buer perbu at varnish-software.com
Tue Apr 14 22:07:27 CEST 2015


On Tue, Apr 14, 2015 at 8:48 PM, Bertrand Caplet <bertrand.caplet at chunkz.net
> wrote:

> Hey guys,
> I set varnish behind a nginX proxy few days ago.
> I want to be able to purge varnish only from the machine where it's
> hosted but because there is a nginx reverse proxy in front of it,
> varnish thinks it's coming from 127.0.0.1 so basically whatever the
> client is, anyone can purge the cache.
> By the way I set some rules for varnish to know x-forwarded-for =
> client.ip.


> Do you know how can I change that?
>

See man vmod_std, look for the function "ip". It allows you to cast a
string in a ip address to match it against a acl.

Oh. There an online version;
https://www.varnish-cache.org/docs/4.0/reference/vmod_std.generated.html#ip-ip-string-ip


-- 
*Per Buer*
CTO | Varnish Software AS
Cell: +47 95839117
We Make Websites Fly!
www.varnish-software.com
[image: Register now]
<http://info.varnish-software.com/varnish-summits-autumn-2014-registration>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20150414/48a8bb3a/attachment.html>


More information about the varnish-misc mailing list