RE: [Zope] HTTP Cache & Zope (Relative/Absolute URL's, seperate s ervers)
As someone previously said, use a VHM or something similar to Virtual Host with Squid+ZServer. That said, if you use a redirector with Squid to get VHM interaction working (you would have to, actually - you don't have a choice, I suggest searching freshmeat.net for pyredir), you should be aware that what gets cached is actually based on the back-end URL. I think that most well-behaving CMF tools using the getURL() function for an object will work with a VHM just fine, as long as your templates or scripts use this rather than the physical path to lookup URLs... If, by chance you are using ZEO, you want to keep your back-end Zope servers using the same back-end URLs if you have more than one (for example, with ZEO); compile Squid with --disable-internal-dns and use Squid's external dnsserver process to resove from /etc/hosts to manage the names of your back-end servers (Squid will round-robin among all IPs with the same hostname in /etc/hosts) this way. Sean -----Original Message----- From: Jean-Francois.Doyon@CCRS.NRCan.gc.ca [mailto:Jean-Francois.Doyon@CCRS.NRCan.gc.ca] Sent: Tuesday, May 14, 2002 10:50 AM To: zope@zope.org Subject: [Zope] HTTP Cache & Zope (Relative/Absolute URL's, seperate servers) Hello, I am working onn adding Squid to my Zope setup to speed things up, but am wondering abour the URL's. In many parts of the site, and even in the default setup of CMF for example, absolute URL functions are used. Now, this becomes a problem if I want to run Squid on a separate machine, since I'm guessing Zope will guess it's URL as being different from what is being used by the user. If I have http://mydomain.com setup as the Squid cache, but the Zope site actually lives at http://nocache.mydomain.com , Zope will give URL outputs as the "nocache" version, which is a problem, since I want Zope to *think* it's actually on mydomain.com ... Has anybody run into this problem ? How do I get around it ? For my own stuff it's easy enough, but in the case of CMF content, it's a problem since a lot of the skin stuff uses absolute paths .... Help?! Thanks, Jean-François Doyon Internet Service Development and Systems Support GeoAccess Division Canadian Center for Remote Sensing Natural Resources Canada http://atlas.gc.ca Phone: (613) 992-4902 Fax: (613) 947-2410 _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (1)
-
sean.upton@uniontrib.com