Core directives

daemon directive

Controls daemonization. Context: main. Default: on. Foreground mode is often used when an external supervisor manages the process. It does not disable workers or guarantee isolation. Partial snippet.

Formal Syntax & Structure

nginx syntaxnginx
daemon on | off;

Parameters & Attributes

NameTypeDescription
on | offstringWhether to detach in daemon mode

Working Example

Example Snippetnginx
daemon off;
Nginx Reference