Skip to content

Instantly share code, notes, and snippets.

@g-r-a-v-e-l-y
Created July 14, 2013 03:46
Show Gist options
  • Save g-r-a-v-e-l-y/5993129 to your computer and use it in GitHub Desktop.
Save g-r-a-v-e-l-y/5993129 to your computer and use it in GitHub Desktop.
An example varnishd config virtual hosting backend services on localhost that are on non-standard ports, because memorizing ports for things is dumb (and so is /etc/services).
backend splunk{
.host = "127.0.0.1";
.port = "8000";
}
backend archiveteam{
.host = "127.0.0.1";
.port = "8001";
}
sub vcl_recv{
if (req.http.host ~ "(?i)^(splunk.)?home.grantstavely.com"){
set req.backend = splunk;
}
if (req.http.host ~ "(?i)^(archiveteam.)?home.grantstavely.com"){
set req.backend = znc;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment