February 2018
Beginner to intermediate
348 pages
9h 40m
English
Context: http, server, and location
This directive allows you to establish correlations between MIME types and file extensions. It's actually a block accepting a particular syntax:
types {
mimetype1 extension1;
mimetype2 extension2 [extension3...];
[...]
}
When Nginx serves a file, it checks the file extension in order to determine the MIME type. The MIME type is then sent as the value of the Content-Type HTTP header in the response. This header may affect the way browsers handle files. For example, if the MIME type of the file you are requesting is application/pdf, your browser may, for instance, attempt to render the file using a plugin associated with that MIME type instead of merely downloading it.
Nginx includes a basic set of ...
Read now
Unlock full access