Using Squid in front of Zope
This show how to use squid in front of Zope as an accelerator.
Steps for Linux/Unix
- Compile and install Squid 3 - refer to squid install
- Install Zope (at least 2.7)
Zope install and configuration
download Zope
In ZEO/ZOPE instance home, edit etc/zope.conf
Squid configuration
http_port 80 vhost
acl in_backendpool dstdomain backendpool
# Zope server running ICP cache_peer 192.168.0.55 parent 8282 8383 no-digest no-netdb-exchange round-robin
# In case of round-robin of ZEO servers
#cache_peer 192.168.0.56 parent 8282 8383 no-digest no-netdb-exchange round-robin #cache_peer 192.168.0.57 parent 8282 8383 no-digest no-netdb-exchange round-robin
cache_peer_access 127.0.0.1 allow in_backendpool cache_peer_access 127.0.0.1 deny all
http_access allow all
never_direct allow all
esi_header – python script
request = container.REQUEST
RESPONSE = request.RESPONSE
RESPONSE.setHeader(Surrogate-Control,max-age=30+60,content="ESI/1.0")
Zope page template
Page template
|
| |
| esi test1 | |