librelist archives

« back to archive

Apache and WSGI Configuration per userdir ?

Apache and WSGI Configuration per userdir ?

From:
Stephane Wirtel
Date:
2010-07-23 @ 12:28
Hi all,

I would like to know if there is a way to define a config file per flask 
project (wsgi) without write it in the global configuration of apache.

For example, use the .htaccess file or  an other file in the directory of 
my project

Directory Structure:
--------------------
$HOME/public_html/flask_app_1/.htaccess (or an other file)
$HOME/public_html/flask_app_1/flask_app_1.wsgi
$HOME/public_html/flask_app_1/flask_app_1.py

$HOME/public_html/flask_app_2/.htaccess
$HOME/public_html/flask_app_2/flask_app_2.wsgi
$HOME/public_html/flask_app_2/flask_app_2.py

In this file, I want to write the WSGIScriptAlias and the WSGIPythonHome 
(if I use a virtual environment)

Thank you

Stéphane

Re: [flask] Apache and WSGI Configuration per userdir ?

From:
Stephane Wirtel
Date:
2010-07-23 @ 12:39
On 07/23/2010 02:28 PM, Stephane Wirtel wrote:
> I would like to know if there is a way to define a config file per flask
project (wsgi) without write it in the global configuration of apache.
> 
> For example, use the .htaccess file or  an other file in the directory 
of my project
> 
> In this file, I want to write the WSGIScriptAlias and the WSGIPythonHome
(if I use a virtual environment)

I think I found a solution:

http://codespatter.com/2009/07/08/python-projects-in-users-home-directories-with-wsgi/