nginx啟動常遇到的問題


問題1: nginx: [emerg] open() "/opt/soft/nginx/mime.types" failed (2: No such file or directory) in /opt/soft/nginx/nginx.config:12

原因:mime.types文件路徑不是/opt/soft/nginx/mime.types  而是/opt/soft/nginx/main-conf/mime.types

解決:nginx.config里改為:include       /opt/soft/nginx/main-conf/mime.types;

 

問題2: nginx: [emerg] unexpected end of file, expecting ";" or "}" in /etc/mime.types:832

原因:還是mime.types路徑不對 不是/etc下的mime.types 應該是nginx安裝目錄下的mime.types才對

解決:nginx.config里改為:include       /opt/soft/nginx/main-conf/mime.types;


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM