Configuring squid with Squish
From Notes_Wiki
<yambe:breadcrumb>Squid_proxy_server_configuration|Squid</yambe:breadcrumb>
Configuring squid with Squish
To configure squid with Squish use following steps:
- Verify that proxy server is working properly without squash
- yum -y install perl-CGI perl-GD
- Download latest version of squash from http://www.ledge.co.za/software/squint/squish/
- tar xzf squish.tar.gz
- cd squish-<version>
- make install
- cp /usr/local/squish/apache-squish.conf /etc/httpd/conf.d
- edit /etc/squid/squid.conf
- replace hostname appropriately as necessary
- Move lines from 'added by squish (begin)' to end before generic 'http_access allow' line
- edit /etc/squid/squish.conf and set something like
- #Try higher limit for saurabh.barjatiya
- saurabh.barjatiya 5Gb/day 50Gb/week
- #Generic limit for everyone else
- * 2Gb/day 10Gb/week
-
- Comment all other existing lines
- service squid restart
- service httpd restart
- Note that squid restart is only required once. Later just changed squish.conf and new settings will get automatically applied
Test by running '/usr/local/squish/squish.cron.sh' manually. This line in present in /etc/crontab. Based on this /etc/squid/squished file is generated by cron once every five minutes.
Example squid configuration with both squish and LDAP authentication
Example configuration with LDAP authentication is:
#Saurabh - Require http authentication for all auth_param basic program /usr/lib64/squid/squid_ldap_auth -b "dc=sbarjatiya,dc=com" -f "uid=%s" -h ldap.sbarjatiya.com acl ldapauth proxy_auth REQUIRED ### added by squish (begin) # acl's for squish - autodetected, sometimes acl SQUISHLOC dst proxy.sbarjatiya.com acl SQUISHED1 proxy_auth -i "/etc/squid/squished" # acl SQUISHED2 ident "/etc/squid/squished" #acl SQUISHED3 src "/etc/squid/squished" # Error info that says you're squished deny_info http://proxy.sbarjatiya.com/squish/?squished& SQUISHED1 # deny_info http://proxy.sbarjatiya.com/squish/?squished& SQUISHED2 deny_info http://proxy.sbarjatiya.com/squish/?squished& SQUISHED3 # HTTP access controls for squish http_access allow SQUISHLOC http_access allow ldapauth !SQUISHED1 http_access deny SQUISHED1 # http_access deny SQUISHED2 #http_access deny SQUISHED3 ### added by squish (end) http_access allow ldapauth
<yambe:breadcrumb>Squid_proxy_server_configuration|Squid</yambe:breadcrumb>