On Jan 7, 2009, at 6:58 AM, JimL wrote:


I have the following (high speed) Plone setup:

Plone -> Pound -> Squid -> Apache -> World Wide Web

My problem is setting up the Virtual Host Monster rewrite rules in Apache.

All the docs I have read assume that you are connecting straight from Apache to Plone (e.g. on port 8080). However, as I am using Squid as a page cache,
something such as:

http://localhost:8080/VirtualHostBase/http/www.example.org:80/example_site/VirtualHostRoot/$1

will just bypass Squid and Pound altogether.

Am I really being dumb here and missing something obvious?


Yes  :-)

Just point the rewrite to the squid port.

http://localhost:[squid_port]/VirtualHostBase/http/www.example.org:80/example_site/VirtualHostRoot/$1

assuming you have the appropriate cache_peer lines in the squid config. If not, you may want to check into plone.recipe.squid (for buildouts), or the "extras" download at http://plone.org/products/cachefu (for non-buildouts), or just hand tweak your config so that it looks something like so:


# Some basic config
visible_hostname example.com
http_port 127.0.0.1:3128 vhost defaultsite=example.com
pid_filename /path/to/squid-install/var/squid.pid

## Log files (http://wiki.squid-cache.org/SquidFaq/SquidLogs)
cache_access_log /path/to/squid-install/var/log/squid-access.log
cache_log /path/to/squid-install/var/log/squid-cache.log
cache_store_log none

# Cache storage
cache_dir ufs /path/to/squid-install/var/squidstorage 1000 16 256
cache_mem 64 MB
maximum_object_size 10 MB
maximum_object_size_in_memory 1 MB

# Purge access - local servers can purge but nobody else
# (works better 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 Peer
acl all src 0.0.0.0/0.0.0.0
cache_peer 127.0.0.1 parent 8080 0 no-query originserver login=PASS name=server_0
cache_peer_access server_0 allow all



_______________________________________________
Setup mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/setup

Reply via email to