I'm looking to extend the mime types in my Nginx configuration.
I've learned that I could, in principle, either edit the mime.types file, or after including mime.types in the http
block of the config you could follow include mime.types
with a types = {...}
to append more types a la this answer.
Since I'm setting up Nginx with Chef, I have a templated configuration in sites-enabled folder that's included into the Nginx config proper. I would prefer not to have to template the nginx config or mime.types file, so I'm hoping it's possible to get it in the sites-enabled config file.
In a similar spirit to the linked question above, could I include this in my sites-enabled file to get the same effect?
http {
types {
# here is additional types
}
}
My working theory is that if blocks work as described in the link above, adding such a block would not overwrite the http
block in the Nginx config, but would extend it as if I had added the types
directly to the http
block in nginx.conf
.
Is this a valid strategy? Or am I overlooking something easier?