Nginx 启动时报错:nginx: [error] open() "/var/run/nginx.pid" failed (2: No such file or directory) 缘由:系统重启 /var/run/ 目录下文件会清空。nginx
方法一: # sudo nginx -c /etc/nginx/nginx.conf # nginx -s reloadblog
方法二: 修改配置文件中pid 的位置: 配置