diff --git a/docker/haproxy/haproxy.conf b/docker/haproxy/haproxy.conf index 4553fef..6930b6b 100644 --- a/docker/haproxy/haproxy.conf +++ b/docker/haproxy/haproxy.conf @@ -38,7 +38,8 @@ frontend website acl is_websocket hdr(Upgrade) -i websocket acl is_nextcloud hdr_beg(host) nextcloud. - acl is_moodle hdr_beg(host) moodle. + acl is_moodle hdr_beg(host) moodle. !path_beg -i /local/tresipuntimportgc/ + acl is_moodle_long hdr_beg(host) moodle. path_beg -i /local/tresipuntimportgc/ acl is_jitsi hdr_beg(host) jitsi. acl is_oof hdr_beg(host) oof. acl is_wp hdr_sub(host) .wp. @@ -57,6 +58,7 @@ frontend website use_backend letsencrypt if { path_beg /.well-known/acme-challenge/ } use_backend be_api if is_nextcloud { path_beg /avatar/ } use_backend be_nextcloud if is_nextcloud + use_backend be_moodle_long if is_moodle_long use_backend be_moodle if is_moodle use_backend be_jitsi if is_jitsi use_backend be_oof if is_oof @@ -142,6 +144,15 @@ backend be_moodle http-request add-header X-Forwarded-Proto https unless existing-x-forwarded-proto server moodle isard-apps-moodle:8080 check port 8080 inter 5s rise 2 fall 10 resolvers mydns init-addr none +backend be_moodle_long + mode http + timeout server 900s + acl existing-x-forwarded-host req.hdr(X-Forwarded-Host) -m found + acl existing-x-forwarded-proto req.hdr(X-Forwarded-Proto) -m found + http-request add-header X-Forwarded-Host %[req.hdr(Host)] unless existing-x-forwarded-host + http-request add-header X-Forwarded-Proto https unless existing-x-forwarded-proto + server moodle isard-apps-moodle:8080 check port 8080 inter 5s rise 2 fall 10 resolvers mydns init-addr none + backend be_nextcloud mode http acl existing-x-forwarded-host req.hdr(X-Forwarded-Host) -m found