Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
appnotes:varnishmirror [2009/05/20 08:30] crackerjackmack draft recovery |
appnotes:varnishmirror [2009/05/21 07:53] (current) crackerjackmack fixed a bug with dead backends |
||
---|---|---|---|
Line 66: | Line 66: | ||
sub vcl_recv { | sub vcl_recv { | ||
+ | |||
+ | // BACKEND declarations have to happen first so that dead hosts are | ||
+ | // properly excluded | ||
+ | |||
+ | // In this case, all these base directories are handled by this single | ||
+ | // backend. It could also look like req.host ~ "linux.etherboot.org" | ||
+ | // for virtual host based setups | ||
+ | if ( req.url ~ "^/(ubuntu|debian|centos|opensuse|suse|fedora|gentoo)" ) { | ||
+ | set req.http.host = "mirrors.kernel.org"; | ||
+ | set req.backend = ubuntu; | ||
+ | } | ||
// Skip repository files (apt) | // Skip repository files (apt) | ||
Line 76: | Line 87: | ||
} | } | ||
- | // In this case, all these base directories are handled by this single | ||
- | // backend. It could also look like req.host ~ "linux.etherboot.org" | ||
- | // for virtual host based setups | ||
- | if ( req.url ~ "^/(ubuntu|debian|centos|opensuse|suse|fedora|gentoo)" ) { | ||
- | set req.http.host = "mirrors.kernel.org"; | ||
- | set req.backend = ubuntu; | ||
- | } | ||
| | ||
// Basic housekeeping for dead backends | // Basic housekeeping for dead backends |