View Single Post
  #7  
Old 21st December 2012, 22:47
lctn lctn is offline
Junior Member
 
Join Date: May 2008
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default nginx failes on restart

I see others are having similar issues. Any help is appreciated with this problem:

I had to install baruwa via apt, since the file in the tutorial could not be found. Maybe that caused the issue. I see it also installed apache2, but not sure if that causes a problem.



/etc/init.d/uwsgi restart && /etc/init.d/nginx restart
* Restarting app server(s) uwsgi [ OK ]
Restarting nginx: nginx: [emerg] unexpected end of file, expecting ";" or "}" in /etc/nginx/sites-enabled/baruwa.conf:7
nginx: configuration file /etc/nginx/nginx.conf test failed



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

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

server_name relay-2.lctn.org;
root /usr/share/pyshared/baruwa;
autoindex on;

access_log /var/log/nginx/access.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;
break;
}

location / {
uwsgi_pass unix:///var/run/uwsgi/app/baruwa/socket;
include uwsgi_params;
}
}
Reply With Quote