diff --git a/haproxy/haproxy.cfg b/haproxy/haproxy.cfg index c1ebf7f..3ca8e42 100644 --- a/haproxy/haproxy.cfg +++ b/haproxy/haproxy.cfg @@ -73,8 +73,7 @@ frontend main bind *:5000 acl url_static path_beg -i /static /images /javascript /stylesheets acl url_static path_end -i .jpg .gif .png .css .js - - use_backend static if url_static + use_backend static if url_static frontend git-http bind *:80 @@ -88,12 +87,21 @@ frontend git-https acl is_git hdr(host) -i git.mic.pp.ua use_backend git_backend if is_git +frontend mc-gravit + bind *:80 + mode http + option forwardfor + acl has_charset hdr_sub(content-type) -i charset= + rspirep (Content-Type.*) \1;\ charset=utf-8 unless has_charset + acl is_mc hdr(host) -i mc.mic.pp.ua + use_backend mc-gravit if is_mc + #--------------------------------------------------------------------- # static backend for serving up images, stylesheets and such #--------------------------------------------------------------------- backend static - balance roundrobin - server static 127.0.0.1:4331 check + balance roundrobin + server static 127.0.0.1:4331 check #--------------------------------------------------------------------- # round robin balancing between the various backends @@ -103,5 +111,11 @@ backend git_backend mode http server git_instance1 127.0.0.1:3000 check +# NOTE: USES WEBSOCKETS +backend mc-gravit + balance roundrobin + mode http + server gravit 127.0.0.1:9274 + backend letsencrypt-backend server letsencrypt 127.0.0.1:8888