I am trying to follow this tutorial to setup uWSGI
with Django
and nginx
on Ubuntu
16.04
.
It all works fine up until the very last step (oh the irony...) where I try to execute this command:
sudo service uwsgi start
If fails with the following error:
Failed to start uwsgi.service: Unit uwsgi.service not found.
Others seem to get a similar error:
Failed to start uwsgi.service: Unit uwsgi.service failed to load: No such file or directory.
The issue appears to be related to the version of Ubuntu. While that tutorial is aimed at Ubuntu 14.04, it seems it will not work for newer versions because in version 15 Ubuntu switched from the upstart
init daemon to the systemd
init daemon.
How can I use systemd
to launch uWSGI so that it works with nginx and Django?