In message <[email protected]>, =?ISO-8859-1?Q?
Lars_J=F8rgensen?= writes:

>Is there any way to put the whole site in maintenance mode in a nice  =
>way? Like telling varnish "don't serve any content, just the error  =
>page"?

Varnish allows you to have multiple VCL programs loaded, but only one
of them is active at any one time.

What you could do, is therefore to have VCL for maintenance, something
along the lines of;

        sub vcl_recv {
                error 503
        }

        sub vcl_error {
                ...
        }

Load it with the cli commands "vcl.load maint <filename>"

When you want to go into maintenance mode, you switch to that VCL,
using "vcl.use maint"

when you want to get back to production, you switch back to your
normal VCL with "vcl.use boot"

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[email protected]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
varnish-misc mailing list
[email protected]
http://projects.linpro.no/mailman/listinfo/varnish-misc

Reply via email to