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;

posted @ 2018-11-07 17:54  飘飘雪  阅读(7111)  评论(0编辑  收藏  举报