mac上启动nginx遇到80端口被占用的解决方法(猜了好久的坑我擦)

今天启动nginx的时候,发现80端口被占用,用ps -ef | grep nginxlsof -i:80都找不到,后来上网搜索后发现是apache的问题,是因为系统自带的apache启动了所以占用了ngxin80端口,解决方案是执行下面的代码。

sudo apachectl stop

然后执行

sudo nginx
解决

猜你喜欢

转载自blog.csdn.net/wkissa/article/details/80371562