TCP mode with forward ip

Hi,
I have a haproxy configured with frontend and backend in tcp mode and apache2 runs on the backend, in the apache2 logs I can’t see the source ip but I get the balancer ip. Is there a way to get apache2 the ip where the request starts from?

Thanks in advance
Dario

You need to add support to Apache for Proxy Protocol. AFAIR, module mod_remoteip implements it and using “send-proxy” on server line in HAProxy will instruct HAProxy to send the client IP to Apache so it can use it for logs, access control, etc.

Hi,
do you have an example of apache side configuration?
The remoteip module is already enabled.

This is bind in frontend (haproxy)
bind *:443 accept-proxy

This is backend (haproxy)
server test01 192.168.1.11:443 send-proxy check
but it does not work.

Regards,
Dario