Loading mod_wsgi for Flask

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Loading mod_wsgi for Flask

Postby cammil » 12. December 2012 21:29

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?
cammil
 
Posts: 1
Joined: 12. December 2012 20:10
XAMPP Version: 5.5.19
Operating System: ubuntu 12.04

Re: Loading mod_wsgi for Flask

Postby JonB » 13. December 2012 15:23

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
:)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 7 guests