解决Mac nginx问题 [emerg] 54933#0: bind() to 0.0.0.0:80 failed (13: Permission denied)
brew services restart nginx
Stopping nginx... (might take a while)
==> Successfully stopped nginx (label: homebrew.mxcl.nginx)
==> Successfully started nginx (label: homebrew.mxcl.nginx)
但是实际上没启动成功,查看下错误日志
tail -n 10 /usr/local/var/log/nginx/error.log
2018/01/25 10:56:53 [emerg] 54933#0: bind() to 0.0.0.0:80 failed (13: Permission denied)
2018/01/25 10:57:40 [emerg] 55281#0: bind() to 0.0.0.0:80 failed (13: Permission denied)
2018/01/25 11:20:22 [emerg] 62763#0: bind() to 0.0.0.0:80 failed (13: Permission denied)
2018/01/25 11:20:48 [emerg] 63020#0: bind() to 0.0.0.0:80 failed (13: Permission denied)
查看看端口占用情况:
sudo lsof -i:80
没发现异常,突然想到之前安装过kong,会使用openresty,而openresty 又自带一个nginx,所以先卸载掉(准备使用minikube来运行kong)
但还是不行。
但是把80换成8080端口就可以,最后看到一篇文章(找不到链接了)里的方法搞定:
sudo chown root:wheel /usr/local/Cellar/nginx/1.12.2_1/bin/nginx
sudo chown root:wheel /usr/local/Cellar/nginx/1.12.2_1/bin/nginx
解决Mac nginx问题 [emerg] 54933#0: bind() to 0.0.0.0:80 failed (13: Permission denied)的更多相关文章
- Ubuntu nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)
在Ubuntu 12中启动刚安装好的Nginx,报错: nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied) 原因如下: ...
- [运维] 如何解决 nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)
环境: 虚拟机 linux centos 7 64 当时正在配置 nginx , 由于解压后的 nginx 默认安装位置是在 /usr/local/ 目录下, 而这个目录是 root 用户才有权限操作 ...
- nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)
启动nginx时报这个错 , 要么用root用户启动 , 要么在配置文件nginx.conf中将server下的listen端口改掉 , 因为在linux中端口号小于1024都是需要root权限的
- 解决nginx报错:nginx: [emerg] bind() to 0.0.0.0:8088 failed (13: Permission denied)
报错描述: nginx: [emerg] bind() to 0.0.0.0:8088 failed (13: Permission denied) 通过ansible远程给主机更换端口并重新启动ng ...
- Starting nginx: nginx: [emerg] bind() to 0.0.0.0:8088 failed (13: Permission denied) nginx 启动失败
Starting nginx: nginx: [emerg] bind() to 0.0.0.0:8088 failed (13: Permission denied) nginx 启动失败 ...
- nginx bind() to 0.0.0.0:**** failed (13: Permission denied)
nginx 启动失败,日志里面报错信息如下: Starting nginx: nginx: [emerg] bind() to 0.0.0.0:**** failed (13: Permission ...
- 解决Nginx的connect() to 127.0.0.1:8080 failed (13: Permission denied) while connect
在进行Nginx+Tomcat 负载均衡的时候遇到了这个权限问题,在error.log日志中.我们能够看到例如以下: connect() to 127.0.0.1:8080 failed (13: P ...
- 解决nginx访问问题connect() to 127.0.0.1:8080 failed (13: Permission denied) while connecting to upstream,
问题:搭建好项目之后,用nginx进行代理,进行日常配置之后,发现前端正常访问,但是后端访问出现错误,报502错误,查找nginx日志,发现connect() to 127.0.0.1:8080 fa ...
- nginx: [emerg] open() "/var/run/nginx.pid" failed (13: Permission denied)
现象 1.centos6.9 用rpm包安装nginx 2.修改Nginx的多个配置文件和配置项 3.service nginx restart 报错: nginx: [emerg] open() & ...
随机推荐
- iOS 开发 Framework
制作Framework 的好处和缺点 好处: 1.如果模块间接口定义的比较完善,模块化的程序具有很好的可扩展性与内聚性: 2.物理上的模块化便于开发过程的管理与测试,尤其是在程 ...
- python 兼容中文路径 + 目标文件是否是图像格式判断
1. 中文路径兼容python程序如果路径中包含中文字符,不加处理会有类似报错:'ascii' codec can't decode byte 0xxx in position xx:ordinal ...
- @ModelAttribute的用法
- 自定义$('#form').serialize() var params = $('#xxx_form').serializeObject();
//注意:获取之前 $("#id").removeAttr("disabled"); $.fn.serializeObject = function () { ...
- Select2 用法
http://www.cnblogs.com/wuhuacong/p/4761637.html 2.这个做详细参考 http://www.jianshu.com/p/c5ab74b91b2e 3.ht ...
- C语言命令行解析函数:getopt/getopt_long
命令行工具下的参数选项有两种,长选项和短选项.短选项以-开头,后面跟单个字母:长选项以--开头,后面可跟多个字母. 一. getopt() 1.功能:解析命令行短选项参数 2.函数原型: #inclu ...
- day30 python学习 struct模块和 subprocess 模块
import subprocess import struct aa=input('>>') obj=subprocess.Popen(aa,shell=True,#aa代表的是读取字符串 ...
- StreamSets SDC RPC Pipelines说明
主要目的是进行跨pipeline 数据的通信,而不仅仅是内部pipeline 的通信,之间不同网络进行通信 一个参考图 pipeline 类型 origin destination 部署架构 使用多个 ...
- 前端基础之HTML快速入门
什么是 HTML? HTML 是用来描述网页的一种语言. HTML 指的是超文本标记语言 (Hyper Text Markup Language) HTML 不是一种编程语言,而是一种标记语言 (ma ...
- chrome 小技巧:保持元素的hover状态
审查元素,选中需要hover的标签 点击"Styles"菜单中的":hov",弹出 Force element state 选中相应的 :hover :acti ...