nginx服务相关操作

安装目录

和大多软件一样一般安装在 /usr/local/ 目录下
/usr/local/

命令man

Usage: nginx [-?hvVt] [-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
-s signal     : send signal to a master process: stop, quit, reopen, reload
-p prefix     : set prefix path (default: /usr/local/nginx/)
-c filename   : set configuration file (default: conf/nginx.conf)
-g directives : set global directives out of configuration file

服务开启停止等操作

开启

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

重启

/usr/local/nginx/sbin/nginx -s reload

关闭

/usr/local/nginx/sbin/nginx -s stop
posted @ 2018-01-29 11:04  不止吧  阅读(161)  评论(0编辑  收藏  举报