为 HAProxy 配置 Squid 服务

2023年12月13日

ID 173534

在完成本部分描述的步骤前,请确保已按照附录12中提供的指示安装并配置了 Squid 服务。

要为 HAProxy 配置 Squid 服务:

  1. 更改 Squid 服务的设置。为此,在 /etc/squid/squid.conf 配置文件中,在 icap_service 指令中,指定 HAProxy 服务器的 IP 地址而不是 127.0.0.1:

    icap_service kwts_req reqmod_precache icap://<带有 HAProxy 的服务器的 IP 地址>:1344/av/reqmod

    icap_service kwts_res respmod_precache icap://<带有 HAProxy 的服务器的 IP 地址>:1344/av/respmod

  2. 重启 Squid 服务。为此,请执行命令:

    service squid restart

HAProxy 的 Squid 服务配置现在已完成。

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.