Have you tried something like: Alias /images/ /some/path/images/
<Directory /some/path/images> ErrorDocument 404 /handle_404 </Directory> WSGIScriptAlias /handle_404 /some/path/scripts/handle_404.wsgi You will need to pick through the WSGI request environment to see whether the target file for the original request is included. I can't remember exactly if it is. The WSGI script can then generate the file to temporary location and then when done move it into correct place and return it for that request as response from the WSGI script application. Graham On 13 July 2011 14:58, ellonweb <[email protected]> wrote: > Hi, > > I've got a WSGIScriptAlias set up in Apache, and I'm adding some new > functionality at /graphs/ that generate some PNG graphs for my > website. I want to set up a caching system for these graphs, however, > rather than having to go all the way through WSGI/Python etc. to read > the previously generated images, is there a way to configure Apache to > look for a file matching the url in some location (for example I use > some static images using a normal Alias), and if the files don't > exist, have Apache fall back to the WSGI which will generate and > output the PNG (and then save it to the file system for future > requests that can be served directly by Apache)? Perhaps using the > WSGI as a 404 handler? > > Thanks in advance, > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/modwsgi?hl=en. > > -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
