View Single Post
  #4  
Old 7th December 2012, 13:12
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default Try This

Let me know if the following steps are successful:

apt-get install nginx uwsgi uwsgi-extra uwsgi-plugin-python

vi /etc/nginx/sites-available/baruwa.conf

[uwsgi]
workers = 2
chdir = /usr/share/pyshared/baruwa
env = DJANGO_SETTINGS_MODULE=baruwa.settings
module = django.core.handlers.wsgi:WSGIHandler()

vi /etc/uwsgi/apps-available/baruwa.ini

server {
server_name spamsnake.mcrirents.com;
access_log /var/log/nginx/access.log;
location / {
uwsgi_pass unix:///var/run/uwsgi/app/baruwa/socket;
include uwsgi_params;
}
}

Create symlinks
rm -r /etc/nginx/sites-enabled/default
cp /usr/share/doc/uwsgi-extra/nginx/uwsgi_params /etc/nginx/
ln -s /etc/nginx/sites-available/baruwa.conf /etc/nginx/sites-enabled/baruwa.conf
ln -s /etc/uwsgi/apps-available/baruwa.ini /etc/uwsgi/apps-enabled/baruwa.ini

Restart both nginx and uwsgi
/etc/init.d/nginx restart && /etc/init.d/uwsgi restart
__________________
Home of the SpamSnake

Last edited by Rocky; 7th December 2012 at 13:14.
Reply With Quote