This article covers most used Nginx commands. You can learn more about Nginx command line at Nginx documentation.
Nginx is one of the most popular web servers in the world. So whether you're currently using it or not, chances are, if you're a web developer chances are you'll likely come in contact with it at some point.
Also, Nginx is well known for its simple configuration, and low resource consumption due to its high performance, it is being used to power several high-traffic sites on the web, such as GitHub, SoundCloud, Dropbox, Netflix, WordPress and many others.
To start the Nginx service, run the following command. Note that this process may fail if the configuration syntax is not OK:
$ sudo systemctl start nginx #systemd
$ sudo service nginx start #sysvinit
To enable Nginx auto-start at boot time, run the following command:
$ sudo systemctl enable nginx #systemd
$ sudo service nginx enable #sysv init
How to Show Nginx Command Help ?
To get an easy reference guide of all Nginx commands and options, use following command.
$ systemctl -h nginx