So I have a setup like Nginx -> varnish -> apache2
If I get a request with a static file it is sent through nginx to varnish and back to nginx again since its a lot faster than letting apache2 server it.
i see a lot of talks about using nginx + varnish and i do not get why? isn`t nginx enough?
nginx has SSI, Reverse proxy cache, lightweight, ssl, can work with cgi, fpm...
varnish has the same things, but no ssl, cgi support
thanks in advance
Introduction
While checking the referrals to my page, I have found that one visitor came through google with the “why use varnish with nginx” keyword, these days I’ve been experimenting with both Nginx and Varnish, in front of my Apache server with a Drupal application.
So, I decided to write a little about what I’ve found.
If you do not know about Nginx or Varnish, here is
Introduction
If you want to use Varnish with Virtual Hosts, you may face the problem of Varnish showing only the default site and not all other virtual sites.
Do not try to fix it tweaking Varnish, as this is something you need to solve in Apache or Nginx configuration, depending on which of them is behind varnish.
In this post I'll show you how to configure both of them Nginx and Apache.
How to c
I was wondering if anyone has any comments / benchmarks / suggestions on Varnish Vs Memcache when used to serve content (usually 2-5kb JS file depending on the parameters in request; thousands of diff files are possible)
Currently we are using nginx + Varnish + LAMP to do this.
I was reading about memcached module of nginx and was wondering if anyone has any benchmarks for caching content in Mem
Currently I manage to configure varnish to cache items from 1 user, but the when the second users comes in varnish fetch another asset from Apache.
I have Nginx listening on port 443 as an SSL terminator, and proxying unencrypted traffic to Varnish on the same server. Varnish 3 is handling this traffic, and traffic coming in directly on port 80. All traffic is passed, unencrypted, to Apache instances on other servers in the cluster.
I have have a nginx server serving http and https and I have varnish behind to cache the apache requests
nginx (80+443) -> varnish (6081) -> apache (8081)
when I serve pages using 443, pages are already cached with port 80 (image references etc)
therefore browser alerts saying there is some encrypted and unencrypted content on the page.
I cant use relative URLS.
I am having difficulty getting my Varnish/Nginx Wordpress setup working. I had set up varnish to listen on poert 80, and nginx to listen on port 8080, with a rule on wp-admin URLs to pass through to nginx (bypassing the cache).