進入nginx安裝目錄sbin下
nginx -c nginx配置文件地址: 啓動
[root@dev-test sbin]# ./nginx -c /usr/local/nginx/conf/nginx.conf
nginx -t : 驗證nginx配置文件是否正確,看到nginx.conf syntax is ok
nginx.conf test is successful 說明配置文件正確。
[root@dev-test sbin]# ./nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
nginx -s reload : 重啓
[root@dev-test sbin]# ./nginx -s reload
nginx -s stop : 快速停止nginx
[root@dev-test sbin]# ./nginx -s stop
nginx -s quit : 完整有序的停止nginx
[root@dev-test sbin]# ./nginx -s quit