HAproxy for onlyoffice Virtual path


Here is examples for nginx and apache, but I need for haproxy

My haproxy.cfg

maxconn 16384
tune.ssl.default-dh-param 2048
log local1 debug
stats socket /var/run/haproxy_info.sock mode 666 level user
stats timeout 2m

maxconn 16384
timeout client 5s
timeout connect 5s
timeout queue 5s
timeout server 30s
timeout tunnel 1h
log global

frontend cloud
bind *:80
mode http
acl is_oo path_beg /oo
option forwardfor header X-Real-IP
use_backend ooffice if is_oo
default_backend cloudnodes

backend cloudnodes
mode http
balance roundrobin
option forwardfor
http-request set-header X-Forwarded-Port %[dst_port]
cookie SERVERID insert indirect nocache
server own-01 check cookie own-01 check inter 1000 rise 1 fall 1
server own-02 check cookie own-02 check inter 1000 rise 1 fall 1

backend ooffice
mode http
option httpclose
option forwardfor header X-Real-IP
http-request set-header X-Forwarded-Port %[dst_port]
http-request add-header X-Forwarded-For %[src]
http-request set-header X-Client-IP %[src]
http-request set-header X-Forwarded-Proto http
http-request set-header Forwarded proto=http
http-request add-header Host %[src]
http-request add-header X-Forwarded-Host %[src]
http-request add-header X-Forwarded-Server %[src]
reqrep ^([^\ :])\ /oo(.) \1\ \2
server oo-01


Moved to Help section, as you are asking for a configuration, rather than providing a working configuration.