首页 > Web开发 > 详细

nginx: [warn] duplicate MIME type "text/html"错误

时间:2018-07-27 20:02:26      阅读:190      评论:0      收藏: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版本不提示这个警告而已,新版本的会出这个警告。

nginx: [warn] duplicate MIME type "text/html"错误

原文:https://www.cnblogs.com/xzlive/p/9379384.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!