Solve Mac Nginx problem [Emerg] 54933#0:bind () to 0.0.0.0:80 failed (13:permission denied)

Source: Internet
Author: User

brew services restart nginx

Stopping ... nginx (might take a while)
==> successfully stopped nginx (Label:homebrew.mxcl.nginx)
==> successfully started nginx (Label:homebrew.mxcl.nginx)

But it didn't actually start successfully, check the error log

tail -n 10  

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)

Look at the port usage:

sudo lsof -i:80

Did not find abnormal, suddenly think of the previous installation of the Kong, will use Openresty, and Openresty comes with an nginx, so first uninstall (ready to use Minikube to run Kong)
But it's still not working.

But change 80 to 8080 port, and finally see an article (Can't find the link) in the method to do:

sudosudo

Fix mac Nginx problem [Emerg] 54933#0:bind () to 0.0.0.0:80 failed (13:permission denied)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.