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

NameTypeDescription
mappingmedia type and extensionsEach 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;}
Nginx Reference