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