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
| Name | Type | Description |
|---|---|---|
| source | IP address | CIDR | unix: | all | Permit 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;