美文网首页
nginx: [warn] duplicate MIME typ

nginx: [warn] duplicate MIME typ

作者: xzlive | 来源:发表于2017-09-28 11:18 被阅读0次

检查配置文件时提示:nginx: [warn] duplicate MIME type "text/html" in /home/web/nginx/inc/gzip.conf:9

[root@localhost sbin]# ./nginx -t -c /home/web/nginx/nginx.conf

nginx: [warn] duplicate MIME type "text/html" in /home/web/nginx/inc/gzip.conf:9


nginx: the configuration file /home/web/nginx/nginx.conf syntax is ok

nginx: configuration file /home/web/nginx/nginx.conf test is successful

解决方式:去掉下面一行中的“text/html”。

原因:text/html根本就不需要写的,gzip默认就会压缩它的,只不过以前的nginx版本不提示这个警告而已,新版本的会出这个警告。2

相关文章

网友评论

      本文标题:nginx: [warn] duplicate MIME typ

      本文链接:https://www.haomeiwen.com/subject/xiymextx.html