Chinaunix首页 | 论坛 | 博客
  • 博客访问: 965405
  • 博文数量: 194
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 2094
  • 用 户 组: 普通用户
  • 注册时间: 2018-11-02 11:19
文章分类

全部博文(194)

文章存档

2019年(162)

2018年(32)

我的朋友

分类: LINUX

2019-07-05 08:16:05

检查nginx.conf是否语法错误
[root@localhost conf]# /usr/local/nginx/sbin/nginx  -t 
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
更新配置文件使其生效
[root@localhost conf]# /usr/local/nginx/sbin/nginx  -s  reload
验证nginx是否配置有误
[root@localhost sbin]# /usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx.conf
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
启动nginx
[root@localhost sbin]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
查看nginx进程
[root@localhost sbin]# ps -ef|grep nginx
root       4870      1  0 22:35 ?        00:00:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
nginx      4871   4870  0 22:35 ?        00:00:00 nginx: worker process
root       4873   2389  0 22:35 pts/0    00:00:00 grep --color=auto nginxs
阅读(5865) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~