您当前的位置: 首页 >  macos

ITKEY_

暂无认证

  • 0浏览

    0关注

    732博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

macOS 安装 nginx

ITKEY_ 发布时间:2020-12-21 17:52:53 ,浏览量:0

最近系统重装,记录一下安装过程吧。

brew install nginx

安装就是这么简单。

查询配置文件位置
nginx -t

结果如下:

itkey@itkeydeMacBook-Pro ~ % nginx -t
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful
修改配置以后重启 nginx
nginx -s reload
重启报错解决办法

服务器重启之后,执行 nginx -t 是OK的,然而在执行 nginx -s reload 的时候报错

nginx: [error] invalid PID number “” in “/run/nginx.pid”

解决方法:

需要先执行

nginx -c /etc/nginx/nginx.conf

nginx.conf文件的路径可以从nginx -t的返回中找到。

nginx -s reload
参考文档

https://blog.csdn.net/achang21/article/details/80039561

关注
打赏
1665243900
查看更多评论
立即登录/注册

微信扫码登录

0.0374s