Setup varnish to handle lists.fedoraproject.org.
This commit is contained in:
parent
03dd724e01
commit
71f5bd9bb5
3 changed files with 18 additions and 9 deletions
|
@ -67,9 +67,11 @@
|
|||
|
||||
- role: httpd/reverseproxy
|
||||
website: lists.fedoraproject.org
|
||||
proxyurl: http://localhost:10033
|
||||
destname: mailman3
|
||||
when: env == "staging"
|
||||
localpath: /
|
||||
remotepath: /
|
||||
header_scheme: true
|
||||
proxyurl: "{{ varnish_url }}"
|
||||
|
||||
# The place for the raw originals
|
||||
- role: httpd/reverseproxy
|
||||
|
|
|
@ -213,13 +213,6 @@ listen badges 0.0.0.0:10032
|
|||
{% endif %}
|
||||
option httpchk GET /heartbeat
|
||||
|
||||
{% if env == "staging" %}
|
||||
listen lists 0.0.0.0:10033
|
||||
balance hdr(appserver)
|
||||
server mailman01 mailman01:80 check inter 10s rise 1 fall 2
|
||||
option httpchk GET /
|
||||
{% endif %}
|
||||
|
||||
{% if env == "staging" %}
|
||||
listen gallery
|
||||
balance hdr(appserver)
|
||||
|
|
|
@ -19,6 +19,17 @@ backend pkgdb {
|
|||
.first_byte_timeout = 160s;
|
||||
}
|
||||
|
||||
backend mailman {
|
||||
.host = "mailman01";
|
||||
.port = "http";
|
||||
.probe = {
|
||||
.url = "/";
|
||||
.interval = 5s;
|
||||
.timeout = 5s;
|
||||
.expected_response = 301;
|
||||
}
|
||||
}
|
||||
|
||||
backend fas01 {
|
||||
.host = "fas01";
|
||||
.port = "http";
|
||||
|
@ -275,6 +286,9 @@ sub vcl_recv {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (req.http.X-Forwarded-Server ~ "^lists.fedoraproject.org") {
|
||||
set req.backend_hint = mailman;
|
||||
}
|
||||
if (req.http.X-Forwarded-Server ~ "^apps.fedoraproject.org" || req.http.X-Forwarded-Server ~ "^apps.stg.fedoraproject.org") {
|
||||
if (req.url ~ "^/koschei") {
|
||||
set req.backend_hint = koschei;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue