views:

62

answers:

0

I have successfully deployed a single pylons app on nginx + uwsgi using:

uwsgi --paste config:/var/www/sites/helloworld/development.ini --socket :3031 -H /var/www/virtualenv

However I am using nginx to virtual host 3 sites.

Based on this tutorial and the uwsgi/wiki/DynamicApps page from main uwsgi site on unbit, I can add apps dynamically to uwsgi without having to create 3 separate uwsgi init.d scripts for 3 master processes over 3 separate ports.

My nginx virtual host configurations are setup just like in the tutorial, but I am having a problem with the UWSGI_SCRIPT value. I have it set to app.wsgi (which is located at /var/www/sites/helloworld/app.wsgi). The script code is:

from paste.deploy import loadapp
wsgi_app = loadapp('config:/var/www/sites/helloworld/development.ini')

But I can't find any straightforward info about this script. Is it suppose to be named app_wsgi.py instead or different code altogether? And where is it supposed to be located? When I visit the site I get: "uWSGI Error - wsgi application not found", then I see this in my uwsgi.log:

interpreter for app 0 initialized.
ImportError: No module named app.wsgi
[pid: 7287|app: -1|req: -1/24] XXX.XXX.XXX.133 () {48 vars in 782 bytes} [Fri Aug 13 18:41:22 2010] GET /page/view/0 => generated 46 bytes in 8 msecs (HTTP/1.1 500) 2 headers in 63 bytes (0 async switches on async core 0)