nginx服務器配置:nginx.pid" failed (2: No such file or directory
/usr/share/nginx/今天配置nginx sinatra 環境過程中一直出現下面的問題“
nginx: [error] open() "/usr/share/nginx/nginx: [error] open() "/usr/share/nginx/logs/nginx.pid" failed (2: No such file or directory)logs/nginx.pid" failed (2: No such file or directory)“
解決方法:
1. 重新運行一下 sudo /usr/share/nginx/sbin/nginx
2. 重啟nginx:sudo /usr/share/nginx/sbin/nginx -s reload
注意:”/usr/share/nginx/“ 是我的nginx安裝的路徑