nginx升级到最新以后,发现用原来的配置启动的时候会提示:

duplicate MIME type "text/html" in /usr/local/nginx/conf/nginx.conf:37

实际上,text/html根本就不需要写的,gzip默认就会压缩它的,只不过以前的nginx版本不提示这个警告而已,新版本的会出这个警告,所以解决办法很简单:把text/html从你的配置中删除(我把text/html改成text/htm也通过了,不知道有没有区别)。

[root@server1 nginx]# vi conf/nginx.conf

:37

gzip_types text/plain text/html text/css application/json application/x-javascript text/xmlapplication/xml application/xml+rss text/javascript;

niginx:duplicate MIME type "text/html" in nginx.conf 错误(转载)的更多相关文章

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

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

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

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

  3. 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 ...

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

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

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

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

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

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

  7. 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 ...

  8. 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 ...

  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. css3 - transform, transition 与 translate

    零.序言 css 3 的新特性,很多都停留在听说而非实际使用.transform, transition, translate 这三长得实在太像,刚开始的时候总是迷迷糊糊,分不清它们的功能.而最近新接 ...

  2. 吴裕雄--天生自然python学习笔记:Python3 数据结构

    列表 Python中列表是可变的,这是它区别于字符串和元组的最重要的特点,一句话概括即:列表可以修改,而字符串和元组不能. list.append(x) 把一个元素添加到列表的结尾,相当于 a[len ...

  3. npm install依赖时,常见错误

    1.npm install依赖时,报错:npm ERR! Unexpected end of JSON input while parsing near '...gin":"^1. ...

  4. fetch API 和 ajax

    fetch('/some.json', { method: 'get', body: { id: 22 } }).then(function (resp) { resp.json().then(con ...

  5. mysql关系型数据库

    参考:https://www.cnblogs.com/alex3714/articles/5950372.html 关系型数据库,是建立在关系模型基础上的数据库,借助于集合代数等数学概念和方法来处理数 ...

  6. http2.0与WebSocket的关系是怎么样的

    按照OSI网络分层模型,IP是网络层协议,TCP是传输层协议,而HTTP是应用层的协议.在这三者之间,SPDY和WebSocket都是与HTTP相关的协议,而TCP是HTTP底层的协议.WebSock ...

  7. 从iPhone X到三星S9,为何现在山寨还能如此肆无忌惮?

    X到三星S9,为何现在山寨还能如此肆无忌惮?" title="从iPhone X到三星S9,为何现在山寨还能如此肆无忌惮?"> 曾几何时,以"土豪金&qu ...

  8. Seeing AI:计算机视觉十年磨一剑,打造盲人的“瑞士军刀”

    Mary Bellard(左)和AnneTaylor(右)是Seeing AI开发团队的成员,SeeingAI成果的背后是计算机视觉数十年研究的支持. 当Anne Taylor走进一个房间时,她像其 ...

  9. 利用FinalData恢复shift+delete误删的文件

    当前位置 : 首页 » 文章分类 :  生活  »  利用FinalData恢复shift+delete误删的文件 上一篇 有关可变形部件模型(Deformable Part Model)的一些说明 ...

  10. 安卓权威编程指南-笔记(第23章 HTTP与后台任务)

    1. 网络连接基本 //通过指定URL获取原始数据,并返回一个字节流数组. public byte[] getUrlBytes(String urlSpec)throws IOException{ / ...