Hi Benoit! Il giorno mer, 10/11/2010 alle 15.45 -0500, Benoit Thiell ha scritto:
> currently WSGI doesn't serve static files and Apache is responsible to > do that. This causes several problems because static files and Python > executables are mixed up in /var/www/admin/. One regression test fails > because the URL http://localhost/admin/bibconvert/bibtex.cfg returns a > 404 error and bibformatadmin complains because js_quicktags.js cannot > be found. > > > Allowing WSGI to serve the static files corrects that problem so is > there a reason not to do it? The correction consists in setting > webinterface_handler_wsgi.CFG_WSGI_SERVE_STATIC_FILES to True. Yes, serving static files via WSGI means serving static files via Python, instead of via Apache which was born for this. Moreover it is not optimized WRT I/O performances because every block of data that need to be sent to the user is first read from disk and then sent to the user. In Apache instead, when one block is sent to the user, the next one is read at the same time. On the other hand if you really want to use WSGI to serve static files you might wish to enable X_SENDFILE support, which would delegate back to Apache serving the file, once Python have performed all the authorization check and have decided which files to actually serve. Anyway in general to serve static file properly you can simply add a specific alias in your Apache configuration. In fact the plan for release 1.0 is also to move all Invenio known static files under specific directories (e.g. var/www/static) so that we can provide a single alias in the default Apache configuration. Cheers! Sam -- Samuele Kaplun Invenio Developer ** <http://invenio-software.org/>
