nginx Start command
1, the first method format : Ngin address-C nginx configuration file location
A. Command/usr/local/nginx/sbin/nginx-c /usr/local/nginx/conf/nginx.conf
2, Nginx Stop Command (3 methods 2 ways)
A, calmly stop need to know the process number
To view the Nginx Process number command: Ps-ef|grep nginx only need to see the master's process number
Stop command Kill-quit process number
B, fast stop kill-term process number or kill-int process number
C, forced stop pkill-9 Nginx
3.nginx Restart command
Sometimes we reboot because we modified the Conf file, so we need to verify that the configuration file is correct before rebooting.
A, the first method of restart
Enter the sbin directory command cd/usr/local/nginx/sbin
Restart the command./nginx-s Reload
B. Restart the second method
Restart command Kill-hup process number
4. Verify that the configuration file is the correct command:
A, method one
/usr/local/nginx/sbin/nginx-t-C /usr/local/nginx/ conf/nginx.conf
B. Enter the sbin directory command cd/usr/local/nginx/sbin
The validation command is./nginx-t
The XXXXXX is OK indicates the configuration file is not a problem
Nginx start, stop, restart, config file check