問題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;