[squid-users] HAProxy + Squid
neok
service.mv at gmail.com
Thu Aug 8 13:44:38 UTC 2019
Hi, I finally did the configuration differently. It's working very well for
me.
In squid.conf configuring:
acl haproxy src x.x.x.x # HAProxy Load Balancer IP
follow_x_forwarded_for allow haproxy
In haproxy.cfg configuring:
defaults
global log
mode http
option httplog
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http
frontend squid
bind *:3128
default_backend squid_pool
backend squid_pool
mode http
SERVERID cookie insert indirect nocache
balance source
hash-type consistent
option httpclose
option forwardfor header X-Client
option forwardfor
server px1 x.x.x.1:3128 check inter 2000 rise 2 fall 3
server px2 x.x.x.2:3128 check inter 2000 rise 2 fall 3
Greetings!
Gabriel
--
Sent from: http://squid-web-proxy-cache.1019090.n4.nabble.com/Squid-Users-f1019091.html
More information about the squid-users
mailing list