Skip to content

Instantly share code, notes, and snippets.

@harssh-sparkway
Created March 12, 2014 12:34
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save harssh-sparkway/9506032 to your computer and use it in GitHub Desktop.
Save harssh-sparkway/9506032 to your computer and use it in GitHub Desktop.
The nginx: unrecognized service error means the startup scripts need to be created.
The nginx: unrecognized service error means the startup scripts need to be created.
Fortunately the startup scripts have already been written.
We can fetch them with wget and set them up following these steps:
# Download nginx startup script
wget -O init-deb.sh http://library.linode.com/assets/660-init-deb.sh
# Move the script to the init.d directory & make executable
sudo mv init-deb.sh /etc/init.d/nginx
sudo chmod +x /etc/init.d/nginx
# Add nginx to the system startup
sudo /usr/sbin/update-rc.d -f nginx defaults
Now we can control nginx using:
sudo service nginx stop
sudo service nginx start
sudo service nginx restart
sudo service nginx reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment