Nginx ngx_http_access_module (HTTP access module) configuration and meaning of each parameter

Source: Internet
Author: User

This module provides a simple Host-Based Access Control.

The ngx_http_access_module module makes it possible to control specific IP clients. Rule checks are performed in the first matching order.

_ Configuration example __:

Location/{: deny 192.168.1.1;: Allow 192.168.1.0/24;: Allow 10.1.1.0/16;: deny all ;}

 

In the preceding example, only IP addresses except 192.168.1.1 are allowed to access the network segments 10.1.1.0/16 and 192.168.1.0/24.

When executing many rules, it is best to use the ngx_http_geo_module module.

Allow
Syntax: Allow [Address | CIDR | all]

Default: No

Context: HTTP, server, location, limit_0000t

The network address described above has the right to directly access

Disable
Syntax: deny [Address | CIDR | all]

Default: No

Context: HTTP, server, location, limit_0000t

The network address described above denies access.

References
Original documentation: http://sysoev.ru/nginx/docs/http/ngx_http_access_module.html

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.