检查配置文件时提示: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版本不提示这个警告而已,新版本的会出这个警告。

相关文章:

  • 2021-12-12
  • 2022-12-23
  • 2022-12-23
  • 2021-09-08
  • 2021-08-06
  • 2022-12-23
猜你喜欢
  • 2022-02-03
  • 2022-12-23
  • 2021-07-30
  • 2022-12-23
  • 2022-12-23
  • 2021-08-11
  • 2021-10-17
相关资源
相似解决方案