Page MenuHomePhabricator
Authored By
Smalyshev
Jun 13 2015, 12:18 AM
Size
1 KB
Referenced Files
None
Subscribers
None

default.vcl

# 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 = default;
if (req.request == "PURGE") {
if (client.ip !~ purge) {
error 405 "Not allowed";
}
return(lookup);
}
if(req.request != "GET" && req.request != "OPTION") {
return(pass);
}
if(req.url ~ "^/bigdata/") {
set req.backend = blazegraph;
set req.http.X-BIGDATA-MAX-QUERY-MILLIS = "30000";
return(pass);
}
return (lookup);
}
sub vcl_pass {
if(req.backend != default && bereq.request != "GET" && bereq.request != "OPTION") {
error 403 "Not allowed.";
}
return (pass);
}

File Metadata

Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
171942
Default Alt Text
default.vcl (1 KB)

Event Timeline