Attention

This document was written for an old version of Plone, Plone 3, and was last updated 1128 days ago.

To learn how to upgrade to the current version of Plone, read the upgrade manual.

Configure Squid

by Bryan Hinton last modified Apr 20, 2009 05:35 PM
Configure Squid

Edit squid.conf as follows:

/usr/local/plone/mydomain.com/parts/squid-instance/squid.conf

# This configuration file requires squid 2.6+.  It is untested with squid 3.x.

visible_hostname mydomain.com
cache_effective_user zadmin
cache_effective_group www
http_port 127.0.0.1:8902 vhost defaultsite=mydomain.com
pid_filename /usr/local/plone/mydomain.com/var/squid.pid
icp_port 3131

## Log files (http://wiki.squid-cache.org/SquidFaq/SquidLogs)
cache_access_log /usr/local/plone/mydomain.com/var/log/squid-access.log
cache_log /usr/local/plone/mydomain.com/var/log/squid-cache.log
cache_store_log none

# Cache storage
cache_dir ufs /usr/local/plone/mydomain.com/var/squidstorage 800 16 256
cache_mem 64 MB
maximum_object_size 10 MB
maximum_object_size_in_memory 1 MB

# Purge access - zope servers can purge but nobody else
# (works best if Zope and Apache are on different IPs)
acl zope_servers src 127.0.0.1
acl purge method PURGE
http_access allow zope_servers purge
http_access deny purge

# Deny caching of POST requests
acl post_requests method POST
cache deny post_requests

# Cache Peers
cache_peer 127.0.0.1 parent 8901 0 no-query originserver login=PASS name=server_0


# Cache Peer Access
acl all src 0.0.0.0/0.0.0.0

cache_peer_access server_0 allow all


Start Squid

# cd /usr/local/plone/mydomain.com
# chown -R zadmin:www ../mydomain*
# ./bin/squid -z -f /usr/local/plone/mydomain.com/parts/squid-instance/squid.conf
# ./bin/squid-instance

Contribute

Something wrong or out of date? Anybody can edit or create a new article in the knowledge base. Simply create an account on this site, log in, and click the Edit button to contribute.