adapt for mod_wsgi usage