nginx启停操作(随笔记录)

查找帮助:

[root@sss]# ./nginx -h
nginx version: nginx/1.6.2
Usage: nginx [-?hvVtq] [-s signal] [-c filename] [-p prefix] [-g directives]

Options:
-?,-h : this help
-v : show version and exit
-V : show version and configure options then exit
-t : test configuration and exit
-q : suppress non-error messages during configuration testing
-s signal : send signal to a master process: stop, quit, reopen, reload
-p prefix : set prefix path (default: /data/nginx/)
-c filename : set configuration file (default: conf/nginx.conf)
-g directives : set global directives out of configuration file

 

 

nginx的启动命令是:

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

-c制定配置文件的路径,不加-nginx会自动加载默认路径的配置文件。

启动:

./nginx

重启:

./nginx -s reload

检查:

./nginx -t

关闭是:

./nginx -s stop或quit

posted @ 2016-06-02 14:04  Amberly  阅读(244)  评论(0)    收藏  举报