nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)
此报错为:logs目录下缺少pid文件。
解决方式:重新指定启动之时加载的配置文件,然后再重启,假如nginx的配置文件目录为:/usr/local/nginx/conf/nginx.conf
先执行命令:/usr/local/nginx/sbin/nginx -c/usr/local/nginx/conf/nginx.conf
然后再:/usr/local/nginx/sbin/nginx -s reload 进行平滑重启就不会报错了