Nginx – Is using both Nginx and Varnish at the same time redudant

cachenginxvarnish

Disclaimer: I'm not an expert on either Linux, Nginx, Varnish or anything related to servers but I've managed to get a Linode VPS up and running, serving two blogs with WordPress on them to different domains. However;

The sites are basically just copies of other setups and nothing that I've done myself, so I wanted to try things out for myself. Tried Apache, tried Nginx with WordPress and W3 Total Cache and APC. I love optimization, and was curious if running Nginx and Varnish together would yield better results than just Nginx? This is with a WordPress site with APC and W3 Total Cache.

Or would just running Nginx as a reverse proxy with Varnish caching with Apache as the backend (as I understood it at least, might be wrong) overall the best solution?

Any input is greatly appreciated. Thanks!

Best Answer

Nginx can be configured to serve static content, serve PHP-generated content via HttpFcgiModule, and cache content via HttpProxyModule. You don't need Varnish or Apache. In your circumstances I would focus on understanding the configuration of one web server rather than two or three.