报错提示:
[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
本文解决了因Nginx配置文件中mime.types路径错误导致的服务启动失败问题。通过调整路径设置,确保Nginx能够正确加载MIME类型配置。
2753

被折叠的 条评论
为什么被折叠?



