Unable to initialise cache of squid proxy server

PROXYsquid

I have just installed Squid on Centos 6.2 x86 based system.

I am trying to configure it through the Squid module for Webmin.

When I go to that screen I get the following message–

Your Squid cache directory /var/spool/squid has not been initialized.This must be done before Squid can be run.

I have tried running the following 2 commands, the commands along with their output are given below–

[root@server ~]# squid -z
2012/02/10 11:03:37| Creating Swap Directories
[root@server ~]#  /usr/sbin/squid -f /etc/squid/squid.conf -z
2012/02/10 11:11:24| Creating Swap Directories

When I go back to the squid module on webmin, I get the same message (as given below) again–

Your Squid cache directory /var/spool/squid has not been initialized.This must be done before Squid can be run.

How do I initialise squid cache correctly?

Best Answer

Try including this directive in your squid.conf file from backend and restart the squid.

cache_dir ufs /var/spool/squid 1000 16 256