ngnix进阶

nginx: [warn] duplicate MIME type "text/html" in /usr/local/nginx/conf/nginx.conf:49

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

解决办法:去掉下面一行中的“text/html”。

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

原因:text/html根本就不需要写的,gzip默认就会压缩它的,只不过以前的nginx版本不提示这个警告而已,新版本的会出这个警告。

相关文章:

  • 2021-08-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-09
  • 2021-04-19
猜你喜欢
  • 2021-10-21
  • 2021-12-19
  • 2021-12-30
  • 2022-01-16
  • 2021-12-29
  • 2021-07-14
相关资源
相似解决方案