LX0-104 · Question #229
In apache configuration which directives are used to restrict access based on host/domain name and IP address?
The correct answer is B. order, allow from and deny from. Apache uses a combination of directives to control access based on hostname, domain, or IP address, allowing administrators to define specific rules for permitted or denied access.
Question
Options
- Arestrict and allow
- Border, allow from and deny from
- Cdeny and accept
- Dallow IP, deny IP, allow DOMAIN and deny DOMAIN
- Eorder, deny and accept
How the community answered
(59 responses)- A3% (2)
- B88% (52)
- D7% (4)
- E2% (1)
Why each option
Apache uses a combination of directives to control access based on hostname, domain, or IP address, allowing administrators to define specific rules for permitted or denied access.
`restrict` is not a standard Apache directive used for host-based access control.
The `order` directive determines the sequence in which `allow from` and `deny from` directives are processed. `allow from` specifies hosts, domains, or IP addresses that are permitted access, while `deny from` specifies those that are denied access, forming the standard mechanism for host-based access control in Apache.
While `deny` is used, `accept` is not a recognized Apache directive for this purpose.
These are not the correct directive names; the proper syntax involves `allow from` and `deny from`.
While `order` and `deny` are correct, `accept` is not a valid Apache directive for access control.
Concept tested: Apache HTTP Server access control directives
Source: https://httpd.apache.org/docs/2.4/mod/mod_authz_host.html
Topics
Community Discussion
No community discussion yet for this question.