Reload Squid Proxy Server Without Restarting Squid Daemon

Posted on in Categories , , , , , , , last updated March 31, 2017

I made some changes to the /etc/squid/squid.conf file and issued the command /sbin/service squid restart. However, this command takes way too much time to restart the server. How do I tell squid to just reread the config file and apply new changes under Linux operating systems?

You can use any one of the following commands to reload the squid after making changes to squid.conf file. Open a command-line terminal (select Applications > Accessories > Terminal) OR login using ssh, and then type the following commands:

How To Reload Squid.conf after change

# /usr/sbin/squid -k reconfigure
OR, use startup script from /etc/init.d/ directory on Linux as follows:
# /etc/init.d/squid reload
Another option is to send HUP single to squid process using the kill command:
# kill -HUP `cat /var/run/squid.pid`
OR
# kill -HUP $(cat /var/run/squid.pid)
OR if you are using Linux systemd based system:
# systemctl reload squid

A note about FreeBSD

Use the following command:
# /usr/local/sbin/squid -k reconfigure

6 comment

Leave a Comment