【部署问题】解决Nginx: [error] open() "/usr/local/Nginx/logs/Nginx.pid" failed(2:No such file or directory)
解决方法:
终端上直接输入下面这一句话执行命令就可以了,个人验证,亲测有效
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
下面是我遇到的问题复现:
(luffy) Path:/usr/local/nginx/conf
>:nginx -s reload
nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)
(luffy) Path:/usr/local/nginx/conf
>:/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
(luffy) Path:/usr/local/nginx/conf
>:nginx -s reload 现在重新启动没有问题了
(luffy) Path:/usr/local/nginx/conf