FAQ

Page Discussion Edit History

ChsHttpAccessModule


Contents

ngx_http_access_module

姝ゆā鍧楁彁渚涗簡涓涓畝鏄撶殑鍩轰簬涓绘満鐨勮闂帶鍒.

ngx_http_access_module 妯″潡浣挎湁鍙兘瀵圭壒瀹欼P瀹㈡埛绔繘琛屾帶鍒. 瑙勫垯妫鏌ユ寜鐓х涓娆″尮閰嶇殑椤哄簭

__閰嶇疆鏍蜂緥__

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涔嬪鐨刬p璁块棶.

褰撴墽琛屽緢澶氳鍒欐椂,鏈濂戒娇鐢 ngx_http_geo_module 妯″潡.

鎸囧

  • [#鏀捐 鏀捐]
  • [#绂佹 绂佹]

Template:Anchor

鏀捐

syntax: allow [ address | CIDR | all ]

default: no

context: http, server, location, limit_except

浠ヤ笂鎻忚堪鐨勭綉缁滃湴鍧鏈夋潈鐩存帴璁块棶

Template:Anchor

绂佹

syntax: deny [ address | CIDR | all ]

default: no

context: http, server, location, limit_except

浠ヤ笂鎻忚堪鐨勭綉缁滃湴鍧鎷掔粷璁块棶


References

Original Documentation