HAProxy proxypass

Hello
I need to create config to forward traffic(haproxysrv1) to other haproxy (haproxysrv2) in other region in cloud and vise versa
Can you please confirm the example config?
Thanks in advance
frontend http-in
bind 0.0.0.0:80
acl prefixed-with-haproxysrv1 path_beg /haproxysrv1/
acl host-is-www-example hdr(host) eq www.example.com
use_backend foo-backend if host-is-www-example prefixed-with-foo
# other rules …
default_backend default-backend

backend foo-backend
http-request set-header Host foo.local
server node1 foo.local:80
# Map url path as ProxyPass does
reqirep ^(GET|POST|HEAD)\ /haproxysrv2/(.) \1\ /\2
# Rewrite redirects as ProxyPassReverse does
acl response-is-redirect res.hdr(Location) -m found
rspirep ^Location:\ (http|https)://haproxysrv2/(.
) Location:\ \1://www.example.com/foo/\2 if response-is-redirect
#option forwardfor

We cannot possible tell you that with the information provided.

Do you have a specific technical question?