diff --git a/playbooks/include/proxies-reverseproxy.yml b/playbooks/include/proxies-reverseproxy.yml index 699857178d..f063ad2134 100644 --- a/playbooks/include/proxies-reverseproxy.yml +++ b/playbooks/include/proxies-reverseproxy.yml @@ -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 diff --git a/roles/haproxy/templates/haproxy.cfg b/roles/haproxy/templates/haproxy.cfg index 3920add022..3cbab6266c 100644 --- a/roles/haproxy/templates/haproxy.cfg +++ b/roles/haproxy/templates/haproxy.cfg @@ -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) diff --git a/roles/varnish/templates/proxy.vcl.j2 b/roles/varnish/templates/proxy.vcl.j2 index 3244cae83d..ba9d44b6bc 100644 --- a/roles/varnish/templates/proxy.vcl.j2 +++ b/roles/varnish/templates/proxy.vcl.j2 @@ -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;