Tuesday, March 29, 2011

wsgi config question

I’m just converting from mod_python to mod_wsgi and making progress.  I would like to be able to deploy multiple independent webapps without having to edit the apache configs each time.  I’m thinking of something like

 

/var/www/wsgi-scripts

                App1.wsgi

                App2.wsgi

                …

 

Where I could deploy a new app by just dropping the .wsgi file into my “wsgi deploy directory”

 

But it looks like the WSGIScriptAlias would point to a specific file and I would need to add a new directive each time I added a new app.  Not exactly the worst thing in the world, but it would be nice to not have to touch the apache .conf files once I get it working.  Any ideas?

 

Here’s my wsgi.conf file

LoadModule wsgi_module modules/mod_wsgi.so

WSGIScriptAlias /myapp /var/www/wsgi-scripts/myapp.wsgi

WSGIDaemonProcess sunbelt.org processes=2 threads=15

WSGIProcessGroup sunbelt.org

LogLevel info

WSGISocketPrefix /var/run/wsgi

<Directory /var/www/wsgi-scripts>

Order allow,deny

Allow from all

</Directory>

 

 

No comments:

Post a Comment