View Single Post
Old 8th March 2011, 20:27
Rocky Rocky is offline
Senior Member
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts

What version of uwsgi/nginx are you running?

So your uwsgi baruwa.ini should look like:
socket = /var/run/uwsgi/uwsgi-python2.6/baruwa/socket
master = true
processes = 2
env = DJANGO_SETTINGS_MODULE=baruwa.settings
module = django.core.handlers.wsgi:WSGIHandler()

Your nginx baruwa.conf should look like:
server {
listen 80;
server_name yourhostname;
root /usr/share/pyshared/baruwa;
#main access log
access_log /var/log/nginx/access.log;
#main error log
error_log /var/log/nginx/error.log;

location /static {
root /usr/share/pyshared/baruwa/static/;
# static resources

location ~* ^.+\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar |bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp| rtf|js)$
expires 30d;
location /favicon.ico {
return 204;

location / {
uwsgi_pass unix:///var/run/uwsgi/uwsgi-python2.6/baruwa/socket;
include uwsgi_params;

And with these settings, you're still not able to hit the site?

Make sure and restart your system after making the configs to clear out any cache or so.

Before you made changes to the conf and ini to /socket, uwsgi was running fine, it was just nginx that needed a pointer. If we can undo the changes, get uwsgi to work, maybe we'll be able to get nginx up by trying a few things with it.
Home of the SpamSnake

Last edited by Rocky; 8th March 2011 at 20:39.
Reply With Quote