检查配置文件时提示: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"错误的更多相关文章

  1. niginx:duplicate MIME type "text/html" in nginx.conf 错误(转载)

    把nginx升级到最新以后,发现用原来的配置启动的时候会提示: duplicate MIME type "text/html" in /usr/local/nginx/conf/n ...

  2. Resource interpreted as Stylesheet but transferred with MIME type text/plain

    今天碰到了Resource interpreted as Stylesheet but transferred with MIME type text/plain 这个错误. 原因:在web中配置了f ...

  3. Refused to execute script from '....js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.md

    目录 问题描述 解决过程 总结 问题描述 在整合 Spring Boot.Spring Security.Thymeleaf 的练习中,对页面进行调试时,发现如下错误提示: Refused to ex ...

  4. because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checkin

    1 前言 浏览器报错误(chrome和firefox都会):because its MIME type ('text/html') is not a supported stylesheet MIME ...

  5. Resource interpreted as Script but transferred with MIME type text/plain:

    我用script做ajax跨域,请求返回的是个文本字符串,chrome提示:Resource interpreted as Script but transferred with MIME type ...

  6. Chrome 报 Resource interpreted as Script but transferred with MIME type text/plain 警告的解决办法

    http://www.2cto.com/os/201312/262437.html 安装了VS2012之后,chrome在加载页面的时候会报 Resource interpreted as Scrip ...

  7. 控制台出现“The script has an unsupported MIME type ('text/html')”报错

    有时候开发React或者Vue项目时,本地运行访问时,会莫名出现报错如下: The script has an unsupported MIME type ('text/html') 这是由于无意中开 ...

  8. 样式加载不出来,浏览器控制台报错:Resource interpreted as Stylesheet but transferred with MIME type text/html

    写登录的时候出现的问题,样式时好时坏,浏览器控制台看到的信息是: Uncaught SyntaxError: Unexpected token <Resource interpreted as ...

  9. Resource interpreted as Stylesheet but transferred with MIME type text/html: css失效

    异常信息: Resource interpreted as Stylesheet but transferred with MIME type text/html: 可能原因 过滤器或者某个地方对所有 ...

随机推荐

  1. jsp获取传过来的值

    request.setCharacterEncoding("utf-8"); String credit=request.getParameter("credit&quo ...

  2. 第三个sprint冲刺第三阶段

    公测版:

  3. 如何把数据快速批量添加到Elasticsearch中

    问题来源 最近新做一个项目,有部分搜索比较频繁的数据,而且量级比较大,预计一两年时间很可能达到100G,项目要求不要存在数据库中,最终出来有两个方案,一个是使用Protocol Buffers存储在文 ...

  4. shell脚本--数值比较

    用于数值比较的无非大于.小于.等于.大于等于.小于等于这几个. 比较格式: [ 数值1 比较符 数值2 ]   注意左边的括号与数值1之间有一个空格,同样,数值2和右边的括号之间也有空格. 数值比较运 ...

  5. [转帖]论iPhone处理器十年进化史

    论iPhone处理器十年进化史 导读: 今天,苹果发布了最新一代的iPhone,作为新一代的旗舰,新手机的功能承载了苹果对未来的希望和消费者的期待.但从我们半导体人看来更关注的是内部技术的演变,尤其是 ...

  6. Win10删除微软拼音输入法的方法

    1. 控制面板 2.更换输入法 选择添加语言 添加上英文输入法之后 进行上下移动 然后删除中文输入法即可 需要在英文的语言栏里面添加-选项-增加输入法 然后删除中文即可.

  7. SVG to Image in js

    SVG to Image in js SVG to Image https://image.online-convert.com/convert-to-svg https://stackoverflo ...

  8. Java基础总结(一)

    1:程序执行是有顺序的,如果没有流程控制语句,执行顺序是从上到下, 2:对象没有引用指向他的时候,jvm虚拟机就会在合适的时候去清理内存垃圾 3:对象的引用就相当于方向盘,操作对象 4:java8大基 ...

  9. Linux 文本处理工具grep,sed,awk

    grep.sed和awk都是文本处理工具,虽然都是文本处理工具单却都有各自的优缺点,一种文本处理命令是不能被另一个完全替换的,否则也不会出现三个文本处理命令了.只不过,相比较而言,sed和awk功能更 ...

  10. 使用vscode 编写Markdown文件

    markdown简单语法参考下面简单事例: # 一级标题 1. 有序列表1 >1. 有序列表1 >>- *test1* >>- **test2** >>- * ...