HTTP core directives

sendfile directive

HTTP/server/location/if in location; default off. Enables OS-assisted file transfer where applicable.

Formal Syntax & Structure

nginx syntaxnginx
sendfile on | off;

Parameters & Attributes

NameTypeDescription
stateon | offSelect kernel-assisted file transmission where supported.

Working Example

Example Snippetnginx
sendfile on;
Nginx Reference