I am set up Flask, a python web micro-framework under apache with mod_wsgi.
The application works fine except python confparser. This throws no error :
parser = ConfigParser.ConfigParser()
parser.read('snati.con')
But when I add :
parser.get('database', 'user')
I got internal server error without anything in the error.log of Apache
I tried also :
file = open("sample.txt")
Same result.
There must be some configuration issues but I can't find it.
My apache conf looks like :
WSGIRestrictStdout Off
<VirtualHost *:80>
ServerName my.com
WSGIDaemonProcess myapp user=me group=me threads=5
WSGIScriptAlias / /home/me/www/myapp.wsgi
<Directory /home/me/www/myapp >
WSGIProcessGroup myapp
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
My app.wsgi
#active the python virtualenv for this application
activate_this = '/home/gilles/www/snati/env/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))
import sys
sys.path.insert(0, '/home/gilles/www/snati/src')
sys.stdout = sys.stderr
from app import app as application
What can possibly be wrong and why can I not get the error in Apache log?