Core directives

include directive

Reads a configuration file or glob at the inclusion point. Context: any. No default. Relative paths use the configuration prefix. Use trusted files; example is a fragment.

Formal Syntax & Structure

nginx syntaxnginx
include file | mask;

Parameters & Attributes

NameTypeDescription
file | maskstringA filename or wildcard pattern

Working Example

Example Snippetnginx
include conf.d/site.conf;
Nginx Reference