[squid-users] Squid service-name macro one config and different ports

Peter Viskup skupko.sk at gmail.com
Fri Feb 2 11:55:34 UTC 2018


On Fri, Feb 2, 2018 at 12:13 PM, Amos Jeffries <squid3 at treenet.co.nz> wrote:
>
> On 02/02/18 23:42, Peter Viskup wrote:
> > Want to run multiple instances of Squid4 on the same server with
> > different ports and one configuration file.
> > Not sure whether (and how) the http_port and snmp_port options can be
> > made as conditional options in squid.conf.
> > At the moment it looks like it is not possible.
>
> "conditional" on what exactly?
>
> When run properly as multi-tenant instances with the -n namespace
> separation the Squid instances know nothing about each other. So there
> is no possible way to configure "I am X not Y" conditions.
>
>
> That said the namespace is provided as a config macro for a reason.
> Which is to make it possible to do this:
>
> squid.conf:
>  ...
>  include /etc/squid/${service_name}.conf
>  ...

This is exactly I was looking for.

This way I would be able to use one global config with service
specific includes.

Thank you.

Peter


More information about the squid-users mailing list