Page 1 of 1

Loading mod_wsgi for Flask

PostPosted: 12. December 2012 21:29
by cammil
Hi,

I'm trying to run Flask (a python framework) alongside my lampp setup. I added the following to httpd.conf:

Code: Select all
<VirtualHost *>
    ServerName example.com

    WSGIDaemonProcess yourapplication user=user1 group=group1 threads=5
    WSGIScriptAlias / /var/www/yourapplication/yourapplication.wsgi

    <Directory /var/www/yourapplication>
        WSGIProcessGroup yourapplication
        WSGIApplicationGroup %{GLOBAL}
        Order deny,allow
        Allow from all
    </Directory>
</VirtualHost>

This is from the flask docs: http://flask.pocoo.org/docs/deploying/mod_wsgi/
I've changed the example variables in the code above to what I think they should be on my machine. I'm currently testing this locally too, not on a webserver.

Unfortunately I have really limited experience with linux, apache or web-related python.

The problem is: I get internal server errors for some pages, but there's nothing in the apache error log files.

It appears at least some internal server errors are caused by uncaught python exceptions (discovered through some trial and error). However, there's no information in apache logs.

Could anyone point me in the right direction?

Re: Loading mod_wsgi for Flask

PostPosted: 13. December 2012 15:23
by JonB
The 'right direction' is to build a LAMP stack if you want to extend/modify things. Ditto on re-compiling
In doing so (building a LAMP stack) - you will learn all the things you currently do not know...
XAMPP/lampp is a suite of applications, not a true stack - its a bash script!

HOWEVER this is the 'other right direction'
http://code.google.com/p/modwsgi/wiki/F ... dQuestions

[rant]why, oh why do people want to 'short-cut' everything. :roll: [/rant]

Good Luck
:)