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 的位置: 配置