Created
December 28, 2020 03:44
-
-
Save codex5/a4582b4d1b9609929196aa8ef8967fae to your computer and use it in GitHub Desktop.
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 example1 { | |
.host = "backend.example1.com"; | |
.port = "8080"; | |
} | |
backend example2 { | |
.host = "backend.example2.com"; | |
.port = "8080"; | |
} | |
sub vcl_recv { | |
if (req.http.host == "example1.com") { | |
#You will need the following line only if your backend has multiple virtual host names | |
set req.http.host = "backend.example1.com"; | |
set req.backend = example1; | |
return (lookup); | |
} | |
if (req.http.host == "example2.com") { | |
#You will need the following line only if your backend has multiple virtual host names | |
set req.http.host = "backend.example2.com"; | |
set req.backend = example2; | |
return (lookup); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment