Your problem is probably the space between @
and uwsgi
, named locations should be written like this
location @uwsgi {
#config
}
The error was reported inside nginx.conf
because that is the config file that includes the other files inside sites-enabled
, check line 72
in your pastebin
include /etc/nginx/sites-enabled/*;
Also don't use sudo service nginx restart
because by doing the shutdown is successful and the start up again fails, so you end up with a dead server, instead use sudo service nginx reload
this way you wouldn't loose your uptime if your config is wrong.
To check where the config error is you can always run sudo nginx -t
to test the config files.