RuHttpAccessModule
(Redirected from NginxRuHttpAccessModule)
Contents |
[edit] ngx_http_access_module
袦芯写褍谢褜 ngx_http_access_module 锌芯蟹胁芯谢褟械褌 蟹邪泻褉褘褌褜 写芯褋褌褍锌 写谢褟 芯锌褉械写械谢褢薪薪褘褏 IP-邪写褉械褋芯胁 泻谢懈械薪褌芯胁. 小芯写械褉卸邪薪懈械 袩褉懈屑械褉 泻芯薪褎懈谐褍褉邪褑懈懈
[edit] 袛懈褉械泻褌懈胁褘
- [#allow allow]
- [#deny deny]
袩褉懈屑械褉 泻芯薪褎懈谐褍褉邪褑懈懈
: location / { : deny 192.168.1.1; : allow 192.168.1.0/24; : allow 10.1.1.0/16; : deny all; : }
袩褉邪胁懈谢邪 锌褉芯胁械褉褟褞褌褋褟 胁 锌芯褉褟写泻械 懈褏 蟹邪锌懈褋懈 写芯 锌械褉胁芯谐芯 褋芯芯褌胁械褌褋褌胁懈褟. 袙 写邪薪薪芯屑 锌褉懈屑械褉械 写芯褋褌褍锌 褉邪蟹褉械褕褢薪 褌芯谢褜泻芯 写谢褟 褋械褌械泄 10.1.1.0/16 懈 192.168.1.0/24, 泻褉芯屑械 邪写褉械褋邪 192.168.1.1. 袝褋谢懈 锌褉邪胁懈谢 屑薪芯谐芯, 褌芯 谢褍褔褕械 胁芯褋锌芯谢褜蟹芯胁邪褌褜褋褟 锌械褉械屑械薪薪褘屑懈 屑芯写褍谢褟 ngx_http_geo_module. 袛懈褉械泻褌懈胁褘
[edit] allow
syntax: allow [邪写褉械褋|CIDR|all]
default: 薪械褌
context: http, server, location, limit_except
袛懈褉械泻褌懈胁邪 褉邪蟹褉械褕邪械褌 写芯褋褌褍锌 写谢褟 褍泻邪蟹邪薪薪芯泄 褋械褌懈 懈谢懈 邪写褉械褋邪.
[edit] deny
syntax: deny [邪写褉械褋|CIDR|all]
default: 薪械褌
context: http, server, location, limit_except
袛懈褉械泻褌懈胁邪 蟹邪锌褉械褖邪械褌 写芯褋褌褍锌 写谢褟 褍泻邪蟹邪薪薪芯泄 褋械褌懈 懈谢懈 邪写褉械褋邪.