重启nginx时出现报错 nginx: [error] open() “/usr/local/var/run/nginx.pid” failed (2: No such file or directory) 解决办法: 找到nginx.conf的文件夹目录,运行命令: nginx -c /usr/local/etc/nginx/nginx.conf 然后运行命令: nginx -s reload 如果找不到目标文件可以使用find命令: find / -name nginx.conf