nginx服务相关操作

符号 阅读:940 2020-02-06 18:44:25 评论: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
标签:linux
声明

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

关注我们

一个IT知识分享的公众号