Assuming that you have installed all requirement and you are using the aptitude packages then you don't need the wsgi.py. All the configuration is in the uwsgi ini/xml/yaml file. (take the format that you prefer).
Here is a minimal example for example.com file for nginx(/etc/nginx/sites-available/examplecom for ubuntu 11.10)
server { listen 80; server_name example.com; access_log /var/log/nginx/projectname.log; location /media { alias /vagrant/test/projectname/media/; } location /static { alias /vagrant/test/projectname/static/; } location / { uwsgi_pass unix:///run/uwsgi/projectname/socket; include uwsgi_params; } }
Create a symbolic link to /etc/nginx/sites-enabled
sudo ln -s /etc/nginx/sites-available/examplecom /etc/nginx/sites-enabled/examplecom
or
sudo /usr/sbin/nxensite examplecom
You are done with NGINX.
Go to /etc/uwsgi/apps-available and create your ini file
sudo vim /etc/uwsgi/apps-available/projectname.ini [uwsgi] virtualenv=/home/vagrant/.virtualenvs/projectenv thread=3 master=1 env = DJANGO_SETTINGS_MODULE=projectname.settings module = django.core.handlers.wsgi:WSGIHandler() chdir = /path/to/my/django/project socket = /run/uwsgi/projectname/socket logto = /var/log/uwsgi/projectname.log
Point your ini to /etc/uwsgi/apps-enabled/projectname.ini
sudo ln -s /etc/uwsgi/apps-available/projectname.ini /etc/uwsgi/apps-enabled/projectname.ini
For more information, see any of these files on your system:
/etc/uwsgi/apps-available/README /etc/uwsgi/apps-enabled/README /usr/share/doc/uwsgi/README.Debian.gz /etc/default/uwsgi
You are done. You can now restart nginx & uwsgi
sudo service nginx restart sudo service uwsgi restart
Cheers!