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)