Includes two main functions
1. IP addresses allowed to access the website
Description: controls which hosts can access a region of the server.
Syntax: Allow from all | host | env = env-variable [host | env = env-variable]...
Context: Directory,. htaccess
Coverage: Limit
Status: Base
Module: mod_access
Instance
SetEnvIf User-Agent ^ KnockKnock/2.0 let_me_in
<Directory/docroot>
Order Deny, Allow
Deny from all
Allow from env = let_me_in
</Directory>
Second, prohibit access to the IP address of the network.
Control which hosts are prohibited from accessing the server
Syntax: Deny from all | host | env = env-variable [host | env = env-variable]...
Context: Directory,. htaccess
Coverage: Limit
Status: Base
Module: mod_access
This command allows you to restrict access to the server based on the host name, IP address, or environment variable. The parameter settings of the Deny Command are identical to those of the Allow command.
Order Command
Note: control the default access status and the order in which the Allow and Deny commands are evaluated.
Syntax: Order ordering
Default value: Order Deny, Allow
Context: Directory,. htaccess
Coverage: Limit
Status: Base
Module: mod_access
Even if the Allow and Deny commands are not accompanied, the existence of an Order command will also affect access to a certain part of the server, because of its impact on the default access status. For example,
<Directory/www>
Order Allow, Deny
</Directory>