[Zope3-Users] best practice for serving static content by
dev101 at magma.ca
Sat Jan 13 09:52:49 EST 2007
----- Original Message -----
From: "Sascha Ottolski" <sascha.ottolski at lalisio.com>
To: <zope3-users at zope.org>
Sent: Saturday, January 13, 2007 8:02 AM
Subject: [Zope3-Users] best practice for serving static content by
> I guess lots of people already solved that, however, I couldn't find
> something in the web yet.
> I'm wondering how it is done best to let a front-end webserver server
> the static content (image, css, js) on a live system, while keeping the
> possibility to have a still working self-serving system (that is, I can
> serve static files if I like, but don't have to).
> Obviously I teach my frontend-server where to find the files by
> rewriting urls.
> Now, when grepping the zope sources, and third party packages, the
> included files are spread around. that seems to make it impossible to
> write proper rewrite rules. if a request wants
> the webserver couldn't possibly know if image.gif is found in
> or in
> or in various other directories that carry images.
> another problem are unpredictable urls that the zope3 core creates with
> contructs like
> <img tal:attributes="src context/++resource++zope3logo.gif" />
> the src attribute could end up in many different URLs. In my opinion,
> one would be better of just use src="/++resource++zope3logo.gif"; but I
> suppose I'm might be missing something here.
> Anyway, does anybody has a recipe for this? At the moment, I can only
> think about symlinking all the files in to some dedicated directories,
> but obviously that doesn't feel to be a good a solution (you will
> forget to set the symlink for the new image you added, and I guess
> name-clashes are possible, though I'm not sure about that one).
If you are using Apache in front of zope then Apache's caching may be of
some assistance (you could look into Apache's mod_cache, mod_disk_cache and
More information about the Zope3-users