[Answer]-How to get uwsgi working with nginx and Django 1.7?

1👍

Firstly, you’re chdiring into WeasyPrintProject, but your project is in WeasyPrintProject/weasyprint_site. You should chdir into that directory inside your uwsgi.ini file.

Secondly, your project name is weasyprint_site, not weasy_print, so you should call module weasyprint_site.wsgi:application instead.

And last problem is: you should specify path to your virtualenv inside uwsgi.ini, so uwsgi process can now where are additional packages required by your application.

To return to your console without interrupting your uwsgi server, you must put it in background, by forking it, daemonizing it or simply launching from init script. I personally recomment using emperor/vassals system built in into wsgi.

Also having your project inside virtualenv directory is not recommended.

Leave a comment