<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
because its steel in cach and i can download and see th urls that i purged before!</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
its <span lang="en"><span title="">Interesting</span></span> that it return 200 code from varnish!!!</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Best regards.</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Guillaume Quintard <guillaume@varnish-software.com><br>
<b>Sent:</b> Monday, December 9, 2019 11:48 AM<br>
<b>To:</b> hamidreza hosseini <hrhosseini@hotmail.com><br>
<b>Cc:</b> varnish-misc@varnish-cache.org <varnish-misc@varnish-cache.org><br>
<b>Subject:</b> Re: Varnish doesnt PURGE urls</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hi,
<div><br>
</div>
<div>How do you tell that it's not purging?</div>
<div><br>
</div>
<div>Cheers,</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr" class="x_gmail_signature">
<div dir="ltr">
<div>-- <br>
</div>
Guillaume Quintard<br>
</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Mon, Dec 9, 2019 at 2:45 AM hamidreza hosseini <<a href="mailto:hrhosseini@hotmail.com">hrhosseini@hotmail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hi,<br>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<div>
<p style="margin-top:0px; margin-bottom:0px">I've two varnish, that one of them use ram as backend and another file as backend, requests first come to varnish(ram) and then go to another server in varnish(file) and then go to nginx, this is my diagram:</p>
<p style="margin-top:0px; margin-bottom:0px"><code><br>
Req=====> [varnish ram] =======> [varnish file] =====> [Nginx]</code></p>
</div>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
And following file is my vcl configuration file that i'm using,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
but when i want to purge a url it doesnt work and it steel remains in cache,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Should i chage my config file?<br>
What's wrong with varnish?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Vcl config file:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span>### Naming note: use [0-9a-zA-Z_] only. no -. Or use camelCase ;-)<br>
</span>
<div>vcl 4.0;<br>
</div>
<div><br>
</div>
<div>import directors;<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>backend varnish_malloc_01 { .host = "192.168.200.12"; .port = "8080"; }<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>sub vcl_init {<br>
</div>
<div>    new varnish_cluster = directors.round_robin();<br>
</div>
<div>    varnish_cluster.add_backend(varnish_malloc_01);<br>
</div>
<div><br>
</div>
<div>}<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>acl purge {<br>
</div>
<div>    "localhost";<br>
</div>
<div>    "192.168.200.0"/24;<br>
</div>
<div>;<br>
</div>
<div>}<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>sub vcl_recv {<br>
</div>
<div><br>
</div>
<div>sub vcl_recv {<br>
</div>
<div>    #set req.backend_hint = varnish_cluster.backend();<br>
</div>
<div>    unset req.http.Cookie;<br>
</div>
<div>    if (req.method == "PURGE") {<br>
</div>
<div>        ### TODO: also purge from the backend<br>
</div>
<div>        if (!client.ip ~ purge) {<br>
</div>
<div>            return(synth(405,"Not allowed."));<br>
</div>
<div>        }<br>
</div>
<div>        return (purge);<br>
</div>
<div>    }<br>
</div>
<div>}<br>
</div>
<div><br>
</div>
<div>sub vcl_backend_response {<br>
</div>
<div>    set beresp.ttl=48h;<br>
</div>
<div>    # Don't cache 404 responses<br>
</div>
<div>    if ( beresp.status == 404 ) {<br>
</div>
<div>        set beresp.ttl = 120s;<br>
</div>
<div>        set beresp.uncacheable = true;<br>
</div>
<div>        return (deliver);<br>
</div>
<div>    }<br>
</div>
<div>}<br>
</div>
<div><br>
</div>
<span></span></div>
<br>
</div>
</div>
_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org" target="_blank">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" rel="noreferrer" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
</blockquote>
</div>
</div>
</body>
</html>