[squid-users] Configure squid 3.5 to use different parent proxies for different listening ports

Eliezer Croitoru eliezer at ngtech.co.il
Mon Feb 20 21:21:27 UTC 2017


And forgot to add also:
nonhierarchical_direct off

----
Eliezer Croitoru
Linux System Administrator
Mobile: +972-5-28704261
Email: eliezer at ngtech.co.il


-----Original Message-----
From: squid-users [mailto:squid-users-bounces at lists.squid-cache.org] On Behalf Of Eliezer Croitoru
Sent: Monday, February 20, 2017 11:20 PM
To: 'Damir Bagapov' <damir.k.bagapov at gmail.com>; squid-users at lists.squid-cache.org
Subject: Re: [squid-users] Configure squid 3.5 to use different parent proxies for different listening ports

You can try  the next:
http_port 3128 name=one
http_port 3127 name=two

acl port_3128 myportname one
acl port_3127 myportname two

always_direct deny port_3128
always_direct deny port_3127

never_direct allow port_3128
never_direct allow port_3127

# 3128
cache_peer proxy01 parent 3128 0 no-query originserver name=proxy3128
cache_peer_access proxy3128 allow port_3128
cache_peer_access proxy3128 deny all

# 3127 
cache_peer proxy02 parent 3128 0 no-query originserver name=proxy3127
cache_peer_access proxy3127 allow port_3127
cache_peer_access proxy3127 deny all
##END

And see if it helps with something.

Eliezer

----
http://ngtech.co.il/lmgtfy/
Linux System Administrator
Mobile: +972-5-28704261
Email: eliezer at ngtech.co.il


From: squid-users [mailto:squid-users-bounces at lists.squid-cache.org] On Behalf Of Damir Bagapov
Sent: Monday, February 20, 2017 11:06 PM
To: squid-users at lists.squid-cache.org
Subject: [squid-users] Configure squid 3.5 to use different parent proxies for different listening ports

Hi,

I have following configuration:

# Squid normally listens to port 3128
http_port 3128

cache_peer proxy1_address parent proxy1_port 0 proxy-only default login=name1:pass1
never_direct allow all

And I need to configure squid in a way when all incoming requests to 3128 port will be redirected to proxy1 (as it works now), and all incoming requests to 3127 will be redirected to proxy2. Is it possible to do?

I've tried to use ACL described here http://wiki.squid-cache.org/ConfigExamples/Reverse/MultipleWebservers#Other_Criteria_than_Domain

http_port 3128
http_port 3127

acl port_3128 port 3128
acl port_3127 port 3127

# 3128
cache_peer proxy01 parent 3128 0 no-query originserver name=proxy3128
cache_peer_access proxy3128 allow port_3128
cache_peer_access proxy3128 deny port_3127

# 3127 
cache_peer proxy02 parent 3128 0 no-query originserver name=proxy3127
cache_peer_access proxy3127 allow port_3127
cache_peer_access proxy3127 deny port_3128

But its not working =(

-- 
Best regards,
Damir

_______________________________________________
squid-users mailing list
squid-users at lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users



More information about the squid-users mailing list