Feel free to use this systemd (based on postgresql) and logrotate
configuration for multi-instance configuration according wiki [1].
Might be useful for others.

The instance is "enabled" by presence of
/etc/squid/${service_name}.instance file.

There could be includes like these in squid.conf

pid_filename /var/run/squid/${service_name}.pid # required
include /etc/squid/conf.d/${service_name}-http_port.conf # at least
http_port needs to differ
include /etc/squid/conf.d/${service_name}-cache_dir.conf # cache_dir
needs to differ either
include /etc/squid/conf.d/${service_name}-log.conf # log targets needs
to differ either

Example of http_port configuration
~# cat conf.d/test-http_port.conf
http_port 8080 name=${service_name} # see the use of ${service_name}
macro in included files

And services are managed via systemd
~# systemctl start squid@prod.service
~# systemctl status squid@prod.service

[1] https://wiki.squid-cache.org/MultipleInstances

Peter

Attachment: squid.logrotate
Description: Binary data

Attachment: squid.service
Description: Binary data

Attachment: squid@.service
Description: Binary data

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

Reply via email to