Nginx+varnish & delivered error_page

revirii nginx-forum at
Wed Jul 28 14:13:32 MSD 2010


we have a little problem with, as the topic says, "Nginx+varnish &
delivered error_page". We have nginx in front as proxy, behind there's a
varnish cashing stuff from a tomcat backend.

Sometimes the tomcat crashes and delivers 503 to varnish; varnish sends
503 to nginx, nginx sends it to the client (browser, fiddler, ...). I've
created some 50x error page which is delivered via nginx:

        error_page 500 501 502 503 504 505 /500.htm;

        # location for error pages
        location = /500.htm {
            root /var/www/errorpages;

It worked as long as varnish wasn't there, but now with varnish i can't
see my own error page anymore. Instead the default varnish 503 page (i
think it's some html code; but with correct 503 status code) is
delivered. Does anyone know why this happens and has an idea how to
prevent the varnish page to be delivered in favor of the nginx page?


Posted at Nginx Forum:,113789,113789#msg-113789

More information about the nginx mailing list