今天记录一下这个错误,重启服务器后服务器后,启动nginx时报这个错:nginx: [error] open() "/run/nginx.pid" failed (2: No such file or directory)
直接上解决方法:
找到你的nginx配置文件的位置(下面这是我自己的),然后执行:
nginx -c /etc/nginx/nginx.conf
#然后重启
nginx -s reload
今天记录一下这个错误,重启服务器后服务器后,启动nginx时报这个错:nginx: [error] open() "/run/nginx.pid" failed (2: No such file or directory)
直接上解决方法:
找到你的nginx配置文件的位置(下面这是我自己的),然后执行:
nginx -c /etc/nginx/nginx.conf
#然后重启
nginx -s reload