The Nginx command-line interface

Author: Al-mamun Sarkar Date: 2020-04-14 07:25:08

Nginx command-line interface. Here I show some important commands for managing the Nginx server. I show you how to start, stop and reload nginx server, Checking and testing Nginx configuration.

 

Starting Nginx Server:

systemctl start nginx

 

Stop Nginx Server:

systemctl stop nginx

 

Check Nginx Server:

systemctl is-active nginx

 

Reload Nginx Server:

systemctl reload nginx

 

Show Available Nginx Commands:

nginx -h

 

Test Nginx Configurations:

nginx -t

Output:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

 

Test configuration, dump it and exit:

nginx -T