#!/usr/bin/env python2.5
from wsgiref.handlers import CGIHandler
from lodgeit import make_app
application = make_app(
# the path to the database
dburi='sqlite:////tmp/pastebin.db',
secret_key='xlw7pe@FO_gZ\xa4\xah\xbdTz\xa7\x9v\xf7\x7f_o\x8f\xedq\xc7\xaf\xc5R'
)
CGIHandler().run(application)
Dies ist ein Beispiel für lodgeit, und sollte eigentlich selbsterkärend sein.
Die Apache Konfiguration ist jetzt ziemlich einfach:
ScriptAlias /foo "/pfad/zum/cgi/script.cgi"und fertig.