I’m new to HAProxy and fairly new to Squid, but I’ve seen that people seem to use HAProxy as a loadbalancer for Squid.
In my test environment I’ve got it working with Squid as forward proxy for a client, and I’ve got it working so that I can see in the HAProxy logs the websites I visit but it doesn’t seem to forward them to squid because I get “Can’t reach this page”.
HAproxy.cfg:
frontend proxy
bind <IP of HAProxy>:8081
backend squidservers
server squid01 <IP of SQUID>:8082 send-proxy-v2
Squid.conf:
http_port 8082 require-proxy-header
acl loadbalancers src <IP of HAProxy>
proxy_protocol_access allow loadbalancers
Client is configured with proxy: <IP of HAProxy>:8081
Squid logs (access.log) doesn’t show either IP of the client or the loadbalancer (haproxy).
HAproxy logs show:
2025-07-16T14:09:57.342989+02:00 haproxy01 haproxy[3706]: <IP of Client>:52333 [16/Jul/2025:14:09:57.342] proxy proxy/<NOSRV> -1/-1/-1/-1/0 503 216 - - SC-- 1/1/0/0/0 0/0 "CONNECT www.microsoft.com:443 HTTP/1.0"
What am I missing?