重复的MIME类型"text/html"? [英] duplicate MIME type "text/html"?

查看:109
本文介绍了重复的MIME类型"text/html"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Nginx配置文件中有这个

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

但是Nginx在启动时给出错误

[warn]: duplicate MIME type "text/html" in /etc/nginx/nginx.conf:25

text/html的实际重复项是什么?是text/plain吗?

解决方案

对于选项gzip_types,默认情况下始终包含mime类型text/html,因此您无需明确指定它.

I have this in Nginx configuration files

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

but Nginx give error when starting up

[warn]: duplicate MIME type "text/html" in /etc/nginx/nginx.conf:25

What is actually duplicate to text/html? Is it text/plain?

解决方案

For the option gzip_types, the mime-type text/html is always included by default, so you don't need to specify it explicitly.

这篇关于重复的MIME类型"text/html"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆