HTTP access directives

allow directive (HTTP)

http, server, location, limit_except; admits a matching address; first match wins. No default directive. Child rules replace inherited lists.

Formal Syntax & Structure

nginx syntaxnginx
allow address | CIDR | unix: | all;

Parameters & Attributes

NameTypeDescription
sourceIP address | CIDR | unix: | allPermit matching peers. First matching rule decides; defining any local allow/deny rules replaces inherited rules.

Working Example

Example Snippetnginx
allow 192.0.2.0/24;
Nginx Reference