Nginx管理命令 | IT运维网
  • 本站启用了账户登录密码错误就锁定模式,如有人误操作被锁请邮件(yvan.lu@ityww.cn)告知我账户名。
  • 本站为个人技术性站点,上面会更新一些系统、网络、虚拟化及云计算等相关的文章,与大家一起参考、学习和交流。
  • 欢迎访问本网站;本站QQ交流群:654792529;如果您觉得本站非常有看点,那么赶紧使用Ctrl+D收藏吧!

Nginx管理命令

Web yvan 6年前 (2018-03-04) 4367次浏览 已收录 0个评论 扫描二维码

Nginx管理命令
查看软件版本及已编译参数

[root@localhost conf]# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.12.2
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) 
built with OpenSSL 1.0.2k-fips  26 Jan 2017
TLS SNI support enabled
configure arguments: --user=www --group=www --prefix=/usr/local/nginx-1.12.2 --with-mail_ssl_module --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-http_sub_module

检测Nginx配置文件语法有无问题,推荐启动和重启程序前都测试下。

[root@localhost conf]# /usr/local/nginx/sbin/nginx -t
nginx: the configuration file /usr/local/nginx-1.12.2/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx-1.12.2/conf/nginx.conf test is successful

启动Nginx

[root@localhost conf]# /usr/local/nginx/sbin/nginx

重新加载Nginx配置,配置文件修改后利用此命令可以避免重新启动Nginx程序使修改过的配置立即生效

[root@localhost conf]# /usr/local/nginx/sbin/nginx -s reload

停止Nginx

[root@localhost conf]# /usr/local/nginx/sbin/nginx -s stop

IT运维网 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明Nginx管理命令
喜欢 (3)
yvan
关于作者:
聪明来自勤奋、知识在于积累、好记性不如烂键盘!

您必须 登录 才能发表评论!