在Mac上用brew安装Nginx,然后修改Nginx配置文件,再重启时报出如下错误:
nginx: [error] invalid PID number "" in "/usr/local/var/run/nginx/nginx.pid"
解决办法:
$ sudo nginx -c /usr/local/etc/nginx/nginx.conf
$ sudo nginx -s reload
nginx: [error] invalid PID number "" in "/usr/local/var/run/nginx/nginx.pid"
$ sudo nginx -c /usr/local/etc/nginx/nginx.conf
$ sudo nginx -s reload