日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

解决Mac nginx问题 [emerg] 54933#0: bind() to 0.0.0.0:80 failed (13: Permission denied)

發布時間:2024/4/14 45 豆豆
生活随笔 收集整理的這篇文章主要介紹了 解决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

轉載于:https://www.cnblogs.com/ikodota/p/8350647.html

超強干貨來襲 云風專訪:近40年碼齡,通宵達旦的技術人生

總結

以上是生活随笔為你收集整理的解决Mac nginx问题 [emerg] 54933#0: bind() to 0.0.0.0:80 failed (13: Permission denied)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。