Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

due to heavy load and disk issue we are going to use varnish webserver

we have worked on nginx and apache webserver

we heard that varnish is little more fast because it store web pages in memory (RAM)

we read this manual https://www.varnish-cache.org/docs/3.0/index.html

but its not very comprehensive and we are unable to understand how to configure varnish

in our webserver configuration we want to server only image from varnish and rest from nginx

so to make any webserver working we have to set its document root directory from where file will going to be served as we are doing in nginx using "root" directive

let say i have few thousand images in this directory /home/images

how can i serve those images using varnish web server


share|improve this question
a) Look at the example configs on the varnish site - they provide a good starting point for many common configurations. b) If you are only caching static content, you could give Nginx's HttpMemcachedModule a try. c) Asking for a 'full tutorial' is a bit beyond the scope of this site - if you can narrow down your question a bit, you'll probably get better responses. Just to clarify though - varnish doesn't serve files directly - it 'proxies' - so no document root, it only looks at requests. –  cyberx86 Feb 22 '12 at 0:37
The varnish reference manual seems to be full of useful examples. –  larsks Feb 22 '12 at 2:33

1 Answer 1

Unlike nginx or Apache, Varnish is not a web server, it cannot serve contents by its own.

share|improve this answer
can we use varnish with nginx –  khizar ansari Feb 22 '12 at 9:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.