'duplicate extension "woff", content type: "font/woff2", previous content type: "font/woff" in /etc/nginx/mime.types
After the latest Nginx update (currently nginx/1.21.6), the following warning started to appear when I do a nginx -t:
nginx: [warn] duplicate extension "woff", content type: "font/woff2", previous content type: "font/woff" in /etc/nginx/mime.types:29
The same issue is happening on all my servers, with Ubuntu 18.04 or 20.04 + latest nginx mainline
I never edited the mime.types files, which has the following:
types {
[...]
font/woff woff;
font/woff2 woff;
}
From what I understand it doesn't like these two lines having the same value, but which one should I delete?
Solution 1:[1]
I found out where the issue was, If you have the same issue you're probably using the ppa:ondrej/nginx-mainline repository, and you have:
font/woff woff;
font/woff2 woff;
Instead of:
font/woff woff;
font/woff2 woff2;
See the file on the nginx/nginx master branch for reference.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | the_nuts |
