ich arbeite mich gerade in Flask ein, scheitere jedoch an der Einbindung in apache. Nach längerer Suche und Studium der Dokumentation wende ich mich also mal an euch

Der apache läuft auf debian squeeze mit php, ohne weitere besondere Konfiguration. Document-root ist /var/www
Die python-Anwendung liegt in /var/www/evl/evl.py:
Code: Alles auswählen
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
from flask import Flask, request, g, redirect, url_for, abort, render_template
SECRET_KEY = 'f53ht39hj5f395h'
DEBUG = False
app = Flask(__name__)
app.config.from_object(__name__)
@app.route('/')
def show_login():
return render_template('login.htm')
app.run(debug=DEBUG)
Code: Alles auswählen
import sys
sys.path.insert(0, "/var/www/evl")
from evl import app as application
Code: Alles auswählen
[Fri Feb 18 09:49:57 2011] [notice] Apache/2.2.16 (Debian) DAV/2 PHP/5.3.3-7 with Suhosin-Patch mod_wsgi/3.3 Python/2.6.6 configured -- resuming normal operations
Code: Alles auswählen
<VirtualHost *>
#ServerName example.com
WSGIDaemonProcess evl user=www-data group=www-data threads=5
WSGIScriptAlias / /var/www/evl/evl.wsgi
<Directory /var/www/evl>
WSGIProcessGroup evl
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
Vielen Dank und schöne Grüße