nginx启动mime.types报错

来源:互联网 发布:电信网络玩网通区 编辑:程序博客网 时间:2024/05/22 08:32

报错提示:

[root@iZ28rvl9qn3Z nginx]# nginx -t -c /etc/nginx1.8.0.conf 
nginx: [emerg] unexpected end of file, expecting ";" or "}" in /etc/mime.types:1300
nginx: configuration file /etc/nginx1.8.0.conf test failed



解决方法:

原来在nginx.conf 文件里,对于 include      mime.types; 加载有误。

因为我把nginx.conf 放在/etc/nginx.conf 

include       mime.types;  实际上是加载了 /etc/mime.types

但/etc/mine.types 并不是nginx所要包含的文件,只需修改下路基即可。

改为:include       /usr/local/nginx1.8.0/conf/mime.types;


well done

0 0
原创粉丝点击