Let's suppose I have these sites:
- www.site1.net, zope instance on localhost (127.0.01) port 8080, plone path is located at /site1/portal
- www.someothersite.com, zope instance on 10.2.0.5 port 9080, plone path /somepath/portal
[buildout]After running buildout for the first time:
parts = squid
versions = versions
[versions]
iw.recipe.squid = 0.9
[squid]
recipe = iw.recipe.squid
squid_owner = proxy
squid_visible_hostname = myservername
squid_cache_dir = /var/cache/squid
squid_log_dir = /var/log/squid
squid_accelerated_hosts =
www.site1.net: 127.0.0.1:8080/site1/portal
www.someothersite.com: 10.2.0.5:9080/somepath/portal
- make a symbolic link "/etc/squid.conf" pointing to parts/squid/etc/squid.conf
- run "bin/squidctl createswap" if required
- check that squid starts normally and that helper processes are running, too (iRedirector.py, squidAcl.py, squidRewriteRules.py)
- in /etc/apache2/sites-available create a symbolic link for all config files located in parts/squid/apache. In our case they should be named "vhost_www.site1.net_80.conf", etc
- run a2ensite to active sites ("a2ensite vhost_www.site1.net_80.conf")
- reload apache
As of iw.recipe.squid 0.9, squid and apache log reside in the same directory, but the next release should allow to have different directory; it should also allow you to set "combined" rather than "common" log format for apache.
Of course do not forget to configure properly CacheSetup on every plone site.
2 commentaires:
Hi,
Thanks for this post.
Normaly you don't have to make a symbolic link for squid.conf.
Secondly in your apache.conf add
Include path_buildout/parts/squid/apache and you don't have to make symbolic link to.
Voila !
@y.boussard:
the symbolic link for squid.conf is here because you (and debian admin scripts) expect to find the conf in /etc/squid/squid.conf, nowhere else.
For apache: my setup allows to use the standard tools (namely: a2ensite, a2dissite) to enable/disable a single site; more important, it is the standard way of dealing with apache virtual hosts (at least under Debian).
It is really important to conform to the way your OS is managing things (conf location, services start/stop, ...). Especially if someone else has to operate on it: principle of least surprise.
Post a Comment