Created
July 14, 2013 03:46
-
-
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).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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