解决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() & ...
随机推荐
- robot framework学习笔记之六—自动变量
自动变量被RF框架创建和修改,在测试执行过程中值可能会变化;另外,某些自动变量在执行过程中并非总是可用.修改自动变量,并不能对变量的初始值产生影响.但可以用某些内建关键字来修改某些自动变量的值. 变量 ...
- 【论文解读】行人检测:What Can Help Pedestrian Detection?(CVPR'17)
前言 本篇文章出自CVPR2017,四名作者为Tsinghua University,Peking University, 外加两名来自Megvii(旷视科技)的大佬. 文章中对能够帮助行人检测的ex ...
- jQuery自动完成点击html元素
/************************************************************************** * jQuery自动完成点击html元素 * 声 ...
- mac 常用开发软件列表
toolbox app jetbrains系开发工具箱,包含了phpstorm idea等开发工具 Postman 接口调试工具,有插件版和单独的app两种.类似paw Sublime 文本编辑器,类 ...
- Laravel学习之旅(二)
控制器 一.怎么编写控制器? 1.控制器文件存放路径:app\Http\Controllers: 2.命名规范如:TestController.php 3.完整的控制器例子如下: <?php n ...
- Complete the Word
ZS the Coder loves to read the dictionary. He thinks that a word is nice if there exists a substring ...
- arduino 配置 esp8266
在连接之前,先把程序下载到arduino中,很简单,就是定义了软口.如果中间要改动程序,要把rx和tx的连线去掉,不然下载程序可能失败. ; ; void setup() { pinMode(rx,I ...
- 转oracle 学习- 数据类型
oracle数据类型 有道是,磨刀不误砍柴工.多了解一些底层的东西,对于Oracle开发.维护大有裨益.个人总结了一些Oracle数据类型集解,相信读者阅读了本文以后,Oracle数据库开发起来会事半 ...
- Linux小问题以及解决方案
1.Linux的时间有问题? ntpdate pool.ntp.org 2.要把一条命令开机执行开机 vim /etc/rc.local 添加要执行的命令 3.系统中网络进程的端口监听情况: nets ...
- Centos下LNMP安装
安装nginx [root@xuegod64 ~]# yum install -y gcc gcc-c++ autoconf automake zlib zlib-devel openssl open ...