add modernpaste02 to haproxy and varnish to cache paste static stuff
This commit is contained in:
parent
f2f7e7260d
commit
b5c4af2f26
3 changed files with 4 additions and 8 deletions
|
@ -144,7 +144,7 @@
|
||||||
- role: httpd/reverseproxy
|
- role: httpd/reverseproxy
|
||||||
website: paste.fedoraproject.org
|
website: paste.fedoraproject.org
|
||||||
destname: modernpaste
|
destname: modernpaste
|
||||||
proxyurl: http://localhost:10055
|
proxyurl: "{{ varnish_url }}"
|
||||||
|
|
||||||
- role: httpd/reverseproxy
|
- role: httpd/reverseproxy
|
||||||
website: admin.fedoraproject.org
|
website: admin.fedoraproject.org
|
||||||
|
|
|
@ -368,6 +368,7 @@ listen docker-candidate-registry 0.0.0.0:10054
|
||||||
listen modernpaste 0.0.0.0:10055
|
listen modernpaste 0.0.0.0:10055
|
||||||
balance hdr(appserver)
|
balance hdr(appserver)
|
||||||
server modernpaste01 modernpaste01:80 check inter 10s rise 1 fall 2
|
server modernpaste01 modernpaste01:80 check inter 10s rise 1 fall 2
|
||||||
|
server modernpaste02 modernpaste02:80 check inter 10s rise 1 fall 2
|
||||||
option httpchk GET /
|
option httpchk GET /
|
||||||
|
|
||||||
{% if inventory_hostname_short == 'proxy01' or inventory_hostname_short == 'proxy10' %}
|
{% if inventory_hostname_short == 'proxy01' or inventory_hostname_short == 'proxy10' %}
|
||||||
|
|
|
@ -132,7 +132,7 @@ backend kerneltest {
|
||||||
|
|
||||||
backend paste {
|
backend paste {
|
||||||
.host = "localhost";
|
.host = "localhost";
|
||||||
.port = "10027";
|
.port = "10055";
|
||||||
}
|
}
|
||||||
|
|
||||||
backend koschei {
|
backend koschei {
|
||||||
|
@ -272,12 +272,7 @@ sub vcl_recv {
|
||||||
}
|
}
|
||||||
if (req.http.X-Forwarded-Server ~ "^paste.fedoraproject.org") {
|
if (req.http.X-Forwarded-Server ~ "^paste.fedoraproject.org") {
|
||||||
set req.backend_hint = paste;
|
set req.backend_hint = paste;
|
||||||
if (req.url ~ "^/skins/") {
|
if (req.url ~ "^/static/") {
|
||||||
unset req.http.cookie;
|
|
||||||
set req.http.clear-cookies = "yes";
|
|
||||||
set req.url = regsub(req.url, "\?.*", "");
|
|
||||||
}
|
|
||||||
if (req.url ~ "^/addons/") {
|
|
||||||
unset req.http.cookie;
|
unset req.http.cookie;
|
||||||
set req.http.clear-cookies = "yes";
|
set req.http.clear-cookies = "yes";
|
||||||
set req.url = regsub(req.url, "\?.*", "");
|
set req.url = regsub(req.url, "\?.*", "");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue