提示错误

mac电脑重启nginx报错nginx: [error] invalid PID number "" in "/usr/local/var/run/nginx.pid"

解决方法

查看端口占用情况

lsof -i:8080

mac电脑重启nginx报错nginx: [error] invalid PID number "" in "/usr/local/var/run/nginx.pid"

删除8080端口进程

kill -9:834

重新启动nginx

sudo nginx -c /usr/local/etc/nginx/nginx.conf
sudo nginx -s reload