IT源码网

nginx服务相关操作

qq123 2020年02月06日 程序员 639 0

安装目录

和大多软件一样一般安装在 /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
评论关闭
IT源码网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!