I know the new Ubuntu is more in favor of systemd
than the upstart
, but when I immigrate my website (python
+nginx
+uwsgi
) from the Ubuntu 14.04, the upstart script is failed to launch during the system boot phase.
The upstart script is the same as the uwsgi docs:
# simple uWSGI script
description "uwsgi tiny instance"
start on runlevel [2345]
stop on runlevel [06]
respawn
exec uwsgi --master --processes 4 --die-on-term --socket :3031 --wsgi-file /var/www/myapp.wsgi
I am sure the nginx server is correctly configured, and the command (as follow) in the upstart script can serve the website normally in the shell (I can open the web pages from the browser).
uwsgi --master --processes 4 --die-on-term --socket :3031 --wsgi-file /var/www/myapp.wsgi
My question is how to make the upstart script work properly in Ubuntu 16.04.