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