Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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

Navigation

* [[:start|Home]] * [[:about|About our Project]] * [[:download|Download]] * [[:screenshots|Screenshots]] * Documentation * [[:howtos|HowTo Guides]] * [[:appnotes|Application Notes]] * [[:faq:|FAQs]] * [[:doc|General Doc]] * [[:talks|Videos, Talks, and Papers]] * [[:hardwareissues|Hardware Issues]] * [[:mailinglists|Mailing lists]] * [[http://support.etherboot.org/|Bugtracker]] * [[:contributing|Contributing]] * [[:editing_permission|Wiki Edit Permission]] * [[:wiki:syntax|Wiki Syntax]] * [[:contact|Contact]] * [[:relatedlinks|Related Links]] * [[:commerciallinks|Commercial Links]] * [[:acknowledgements|Acknowledgements]] * [[:logos|Logo Art]]

QR Code
QR Code appnotes:varnishmirror (generated for current page)