Redirecting traffic to Varnish Cache Server

Rodney Bizzell rbizzell at measinc.com
Tue Mar 14 21:46:51 CET 2017


So I have setup a basic default.vcl and my question how do I get the Varnish server to answer web request before going to the backend  drupal servers not sure if I am stating this correctly. Our DNS admin point the urls to Varnish server but I am getting page not found. Am I missing a config in the default.vcl? Thanks! I researched and I am not seeing any good information.

backend drupal {
    .host = "drupal.miat.co";
    .port = "80";
    .connect_timeout = 6000s;
    .first_byte_timeout = 6000s;
    .between_bytes_timeout = 6000s;
}

backend ncwrite {
    .host = "ncwrite.miat.co";
    .port = "80";
    .connect_timeout = 6000s;
    .first_byte_timeout = 6000s;
    .between_bytes_timeout = 6000s;
}

sub vcl_recv {
    if (req.http.host == "drupal.miat.co"){
        set req.backend_hint = drupal;
    } elsif (req.http.host == "ncwrite.miat.co"){
       set req.backend_hint = ncwrite;
       return (hash);
    }
}



This email (including any attachments) may contain confidential information intended solely for acknowledged recipients. If you think you have received this information in error, please reply to the sender and delete all copies from your system. Please note that unauthorized use, disclosure, or further distribution of this information is prohibited by the sender. Note also that we may monitor email directed to or originating from our network. Thank you for your consideration and assistance. |
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20170314/0b2e3756/attachment.html>


More information about the varnish-misc mailing list