Author Topic: How to exclude any file or folder from varnish cache?  (Read 19662 times)

0 Members and 1 Guest are viewing this topic.

Offline
**
How to exclude any file or folder from varnish cache?
« on: November 05, 2015, 01:58:47 PM »
Hello,

I have hosted a File Server in my web hosting running with CWP. I have got huge files there like 6 GB 10 GB also small files like 6 MB 10 MB 150 MB. Now I want my CWP varnish cache not to cache these files because these files got direct download links and might get updated very often. How can I do that? I have facing a problem with the greater files like 6 GB or 10 GB files. When I use varnish cache in my server I cannot get direct download of these files. The direct download literally doesn't work. If I disable varnish and only keep apache then all the downloads work. What might be the solution to this problem?


Please help CWP team.


Thanks in advance...

Offline
*****
Re: How to exclude any file or folder from varnish cache?
« Reply #1 on: November 10, 2015, 07:05:59 AM »
Hello.

You can configure it manualy.
Just add in vcl_recv something like that:

Code: [Select]
if (req.url ~ "^/path/to/exclude/folder") {
return(pass);
}
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
**
Re: How to exclude any file or folder from varnish cache?
« Reply #2 on: November 11, 2015, 09:52:49 PM »
Not working for me...

Offline
**
Re: How to exclude any file or folder from varnish cache?
« Reply #3 on: November 13, 2015, 05:21:30 PM »
Any good way to do it from admins? Because the suggestion of Igor seems not working at all...

Offline
**
Re: How to exclude any file or folder from varnish cache?
« Reply #4 on: November 14, 2015, 01:47:57 PM »
No admin to help?

Offline
*****
Re: How to exclude any file or folder from varnish cache?
« Reply #5 on: November 20, 2015, 08:17:57 AM »
No admin to help?

Let us know if you will found a solution.
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services