Obtain real IP from nextcloud clients behind HAProxy TCP mode

hi
I want to obtain the real IP of the Nextcloud clients behind HAProxy, at the moment only the IP of HAProxy is displayed in the Apache2 logs.

Nextcloud Hub 6 27.1.2 (no docker , no snap ) manual installation, All checks have been carried out successfully
Apache 2.4.57 Debian12
HAProxy version 2.8.3-1~bpo12+1 2023/09/08 mode TCP
config Haproxy:


acl acl_nextcloud    req.ssl_sni -i nextcloud.XXXXXXXXXX.cloud

use_backend backend_nextcloud if acl_nextcloud

# APP 2 NEXTCLOUD
backend backend_nextcloud
    description NEXTCLOUD
    mode tcp
    option ssl-hello-chk
    server server_nextcloud 192.168.1.6:443 check

I specify that the nextcloud instance works without any problem locally or remotely

Thank you in advance for your help

Maybe this article will point you into the right direction

Apache Docker behind reverse proxy

1 Like

hi
I solved my IP transfer problem from HAProxy to Apache2 in TCP mode by asking the question on the HAProxy help forum, follow the link for the solution:

1 Like