HTTP directives
types directive (HTTP)
Defines an extension-to-media-type table. Context: http, server, location. A child table can replace an inherited table. Use in a reviewed HTTP config.
Formal Syntax & Structure
nginx syntaxnginx
types { ... }Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| mapping | media type and extensions | Each entry has a media type and one or more extensions, followed by a semicolon. |
Working Example
Example Snippetnginx
types { text/html html; text/css css;}