niginx:duplicate MIME type "text/html" in nginx.conf 错误(转载)
把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 错误(转载)的更多相关文章
- nginx: [warn] duplicate MIME type "text/html"错误
检查配置文件时提示:nginx: [warn] duplicate MIME type "text/html" in /home/web/nginx/inc/gzip.conf:9 ...
- Resource interpreted as Script but transferred with MIME type text/plain:
我用script做ajax跨域,请求返回的是个文本字符串,chrome提示:Resource interpreted as Script but transferred with MIME type ...
- 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 ...
- 控制台出现“The script has an unsupported MIME type ('text/html')”报错
有时候开发React或者Vue项目时,本地运行访问时,会莫名出现报错如下: The script has an unsupported MIME type ('text/html') 这是由于无意中开 ...
- Resource interpreted as Stylesheet but transferred with MIME type text/plain
今天碰到了Resource interpreted as Stylesheet but transferred with MIME type text/plain 这个错误. 原因:在web中配置了f ...
- 样式加载不出来,浏览器控制台报错:Resource interpreted as Stylesheet but transferred with MIME type text/html
写登录的时候出现的问题,样式时好时坏,浏览器控制台看到的信息是: Uncaught SyntaxError: Unexpected token <Resource interpreted as ...
- 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 ...
- 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 ...
- Resource interpreted as Stylesheet but transferred with MIME type text/html: css失效
异常信息: Resource interpreted as Stylesheet but transferred with MIME type text/html: 可能原因 过滤器或者某个地方对所有 ...
随机推荐
- Mysql错误问题:ERROR 1005 (HY000): Can't create table 'crm_1.tbl_client' (errno: 150)
MySQL外键创建条件: 1.两个表必须是InnoDB数据引擎2.外键表的外键字段必须是主键3.字段类型必须一致 创建表时创建外键: create table tbl_client(userName ...
- C语言标准库 常用函数说明
void *memset(void *str, int c, size_t n) Syntax void *memset(void *str, int c, size_t n) Description ...
- LG_2869_[USACO07DEC]美食的食草动物Gourmet Grazers
题目描述 Like so many others, the cows have developed very haughty tastes and will no longer graze on ju ...
- vm文件的优点
vm文件的优点 相较于内容写在jsp 文件: 1.在网页上上浏览和下载的内容用的是同一套,也就是说只需要维护一套内容,页面上看到的和下载得到的是一致的. 2.版本控制较为简便, 实现了页面内容和jsp ...
- spring整合ehcache实现缓存
Spring 提供了对缓存功能的抽象:即允许绑定不同的缓存解决方案(如Ehcache),但本身不直接提供缓存功能的实现.它支持注解方式使用缓存,非常方便. spring本身内置了对Cache的支持,之 ...
- grep显示前后几行信息
显示foo及前5行 1 grep -B 5 foo file 显示foo及后5行 1 大专栏 grep显示前后几行信息ode"> grep -A 5 foo file 显示 file ...
- 3名程序员被抓!开发“万能钥匙”APP,撬走3个亿
来自:程序员头条 报道 又有 3 名程序员被抓!开发"万能钥匙"APP,撬走 3 亿! 前几天,据央视新闻报道,上海公安机关接到共享单车企业报案,随后破获了一起共享单车万能解锁 A ...
- Louis的「每周语文」
说明:此专栏为Louis收录的经典语录及书影音标记,每周一更新. 成长的本质是变得复杂.当你的主观世界遇到客观世界,之间的那条沟,你掉进去,叫挫折,爬出来,叫成长. -- 语出罗振宇在奇葩说第四季的结 ...
- Android注解支持Support Annotations详解
###注解支持(Support Annotations)Android support library从19.1版本开始引入了一个新的注解库,它包含很多有用的元注解,你能用它们修饰你的代码,帮助你发现 ...
- 函数节流throttle和防抖debounce
throttle 函数节流 不论触发函数多少次,函数只在设定条件到达时调用第一次函数设定,函数节流 1234567891011 let throttle = function(fn,intervalT ...