When setting up a new Ubuntu 15.10 x64 server running nginx, gunicorn, django as a sudo user. I am getting an error message by running service gunicorn start
(as root, yes it is a bad idea):
Failed to start gunicorn.service:
Unit gunicorn.service failed to load: No such file or directory.
From an active virtualenv I can start gunicorn using:
Any ideas would be greatly appreciated on how to resolve this as I have tried quite a few suggestions from various web searches that mentioned problems similar to this with no luck.
My gunicorn file is at `/etc/init/gunicorn.conf` and is configured as follows:
description "Gunicorn application server handling myproject"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
setuid myuser
setgid www-data
chdir /home/myuser/myproject
exec myprojectenv/bin/gunicorn --workers 3 --bind unix:/home/myuser/myproject/myproject.sock myproject.wsgi:application
This question is identical to here, but I don't have privileges to comment and the user seemed to have found the answer with systemd. The original problem stems from following this guide on Ubuntu 15.10. I tried checking the comments section on that page, searching with my google fu and various websites arriving here.
Simplified help would be much appreciated for someone somewhat new with Ubuntu.