vcl 4.0; # This is a basic VCL configuration file for varnish. See the vcl(7) # man page for details on VCL syntax and semantics. # # Default backend definition. Set this to point to your content # server. # backend default { .host = "127.0.0.1"; .port = "8080"; } backend blazegraph { .host = "127.0.0.1"; .port = "9999"; } acl purge { "127.0.0.1"; } # # Below is a commented-out copy of the default VCL logic. If you # redefine any of these subroutines, the built-in logic will be # appended to your code. sub vcl_recv { set req.backend_hint = default; if (req.method == "PURGE") { if (client.ip !~ purge) { return(synth(405,"Not allowed.")); } return(hash); } if(req.method != "GET" && req.method != "OPTION") { return(pass); } if(req.url ~ "^/bigdata/") { set req.backend_hint = blazegraph; set req.http.X-BIGDATA-MAX-QUERY-MILLIS = "30000"; return(pass); } return (hash); } sub vcl_backend_fetch { if(bereq.backend != default && bereq.method != "GET" && bereq.method != "OPTION") { return(abandon); } return (fetch); }