Simple config w/ planetposen & motd-larry backends
This commit is contained in:
48
default.vcl
Normal file
48
default.vcl
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
vcl 4.0;
|
||||||
|
|
||||||
|
# Default backend definition. Set this to point to your content server.
|
||||||
|
backend motd-larry {
|
||||||
|
.host = "motd-larry.schleppe";
|
||||||
|
.port = "3000";
|
||||||
|
}
|
||||||
|
|
||||||
|
backend plansetposen {
|
||||||
|
.host = "planetposen.schleppe";
|
||||||
|
.port = "80";
|
||||||
|
}
|
||||||
|
|
||||||
|
sub vcl_recv {
|
||||||
|
# Happens before we check if we have this in cache already.
|
||||||
|
#
|
||||||
|
# Typically you clean up the request here, removing cookies you don't need,
|
||||||
|
# rewriting the request, etc.
|
||||||
|
|
||||||
|
if (req.http.host == "motd-larry.schleppe") {
|
||||||
|
set req.backend_hint = motd-larry;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (req.http.host == "planetposen.schleppe") {
|
||||||
|
set req.backend_hint = planetposen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub vcl_backend_response {
|
||||||
|
# Happens after we have read the response headers from the backend.
|
||||||
|
#
|
||||||
|
# Here you clean the response headers, removing silly Set-Cookie headers
|
||||||
|
# and other mistakes your backend does.
|
||||||
|
|
||||||
|
|
||||||
|
# Disable streaming; the body of a backend fetch may be delivered to clients
|
||||||
|
# as it is being delivered.
|
||||||
|
#
|
||||||
|
# beresp.do_stream = false
|
||||||
|
}
|
||||||
|
|
||||||
|
sub vcl_deliver {
|
||||||
|
# Happens when we have all the pieces we need, and are about to send the
|
||||||
|
# response to the client.
|
||||||
|
#
|
||||||
|
# You can do accounting or modifying the final object here.
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user