When restarting or reloading nginx, we’re getting the following warning:
[root@vps01]# nginx -t
nginx: [warn] duplicate MIME type "text/html" in /etc/nginx/nginx.conf:34
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
The text/html is always compressed by gzip module, this seems to be the same for the ngx_brotli module. You need just to remove it from gzip_types or ignore the warning.
[root@vps01/]# nginx -t
nginx: [warn] duplicate MIME type "text/html" in /etc/nginx/nginx.conf:34
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
###After removed the text/html from gzip_types in the nginx configuration file.
[root@vps01 /]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
ADVERTISEMENT
5/5 - (1 vote)