Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Httpd access control method

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Access control: any method that controls access to any resource.

Related modules:

Mod_authz_core and mod_authz_host, mod_rewrite

Methods:

1 Control host access

Module: mod_authz_host

Directives: Require provides a variety of different ways to allow or deny access to resources, or you can use RequireAll, RequireAny, RequireNone instructions

Require host host addr

Require ip ip.address ip address / CIDR specification

Require not ip 10.1.1.1

Require not host www.com

Require all granted allows all acc

Require all denied denies all access

Require expr expression allows access if expression is calculated as true

Require user userid can only be accessed by specified users

User groups specified by Require group group-name can access the

Require valid-user can be accessed by all valid users

Access control of 2 variables

Access can be allowed or denied based on environment variables or request header values

Columns: user browser-based access control

Require all denied

Or use Require expr syntax: Require expr% {HTTP_USER_AGENT}! = 'Mozilla'

Note: http://httpd.apache.org/docs/2.4/expr.html

3 mod_rewrite

This module provides a regular expression analyzer-based rewriting engine to rewrite URL requests in real time, which is a rule-based rewriting engine.

Mod_rewrite maps URL to a file system path, or it can redirect one URL to another URL.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report