Squid
From bemoko developer wiki
Product - Squid
- Home: http://www.squid-cache.org/ Version: 2.7.STABLE6
- Summary: caching proxy for the Web
Introduction
Squid is an excellent caching proxy suitable for caching requests from a bemokoLive server and request made by a bemokoLive server. In particular it provides value if bemokoLive sites make requests for external sites such as adapting an existing external web site for mobile.
Installation
FC
- yum install squid
- /etc/init.d/squid start
- Configuration file @ /etc/squid/squid.conf
- Logs @ /var/log/squid
Mac OS
- sudo port install squid[1]
- sudo -u squid /opt/local/sbin/squid -N -d 1 -D[2] ← test installation
- Logs are written to /opt/local/var/squid/logs and cache is written to /opt/local/var/squid/cache/
- sudo launchctl load -w /Library/LaunchDaemons/org.macports.Squid.plist ← add to startup
Remove from startup with:
- sudo launchctl unload -w /Library/LaunchDaemons/org.macports.Squid.plist ← remove from startup
Configuration
- Default port - 3128
Squid Web Console
To enable the squid web console copy the cachemgr.cgi into the Apache cgi-bin[3], e.g.:
- cp /opt/local/libexec/cachemgr.cgi /opt/local/apache2/cgi-bin
Access Control Lists
To control access to specific domain or domains[4]:
acl whitelist dstdomain .myhost.com http_access allow whitelist http_access deny all
Administration
- squidclient -m PURGE http://bemoko.com/[5]← purge a URL from the cache
References
- ↑ Squid - http://squid.darwinports.com/
- ↑ Starting squid - http://www.deckle.co.za/squid-users-guide/Starting_Squid
- ↑ Optimising squid - http://www.faqs.org/docs/securing/chap28sec235.html
- ↑ dstdomain - http://www.visolve.com/squid/squid24s1/access_controls.php
- ↑ SquidFAQ - http://wiki.squid-cache.org/SquidFaq/OperatingSquid#head-f418956943bd72ee8b94390ec9df241c3d1dfd20
