I am using Stunnel, Varnish, and nginx with a nodejs app, and I'm having trouble redirecting non-https pages (http://manager.domain.com) to their respective https page (https://manager.domain.com). I just get stuck in a redirect loop because all the traffic passes through varnish first. The main reason for this set up is to use sockets with ssl.
Stunnel listens on port 443.
Currently I migrating my environment with Varnish + Apache + mod_php to
Varnish + Nginx + php-fpm.
When i set up new env Nginx + Varnish + php_fpm, ESI not work's
varnish.cfg ESI
vcl_fetch sub {
set beresp.do_esi = true;
set beresp.ttl = 5s;
}
Do I need to run additional ESI module in nginx?
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 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.
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
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
I'm in the process of architecting the backend of a new Node.js web app that i'd like to be pretty scalable, but not overkill. In all of my previous Node.js deployments, I have used Nginx to serve static assets such as JS/CSS and reverse proxy to Node (As i've heard Nginx does a much better job of this / express is not really production ready).
However, Nginx does not support WebSockets.
I am setting up a single Debian server serving Magento with Mysql. High load is expected (millions of hits per day). I've been reading various people's comments and found so many different setups but I am not sure what to do if I want to. Load balancing between several servers would of course be nice but I have only one server.