How to exclude any file or folder from varnish cache?

Started by Farukh Khan, November 05, 2015, 01:58:47 PM

Previous topic - Next topic

Farukh Khan

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...

Igor S.

Hello.

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

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

Farukh Khan


Farukh Khan

Any good way to do it from admins? Because the suggestion of Igor seems not working at all...

Farukh Khan


Igor S.




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