Haproxy and url rewrites to internal servers and urls

Eureka, i found it…

I needed to add the following in my backend:

  acl p_root path -i /
  http-request set-path /xwiki if p_root

so my complete wiki backend now looks like:

backend bk_wiki
   option httpclose
   option forwardfor
   http-request set-header X-Forwarded-Port %[dst_port]
   http-request add-header X-Forwarded-Proto https if { ssl_fc }
   http-check expect string 200\ OK
   acl p_root path -i /
   http-request set-path /xwiki if p_root
   server wiki1 10.1.0.22:443 ssl verify none maxconn 1000 weight 10 check
1 Like