LFCS · 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. This question asks to identify the correct Apache HTTP Server directives used to control access to resources based on client hostnames or IP addresses.
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
(19 responses)- B95% (18)
- D5% (1)
Why each option
This question asks to identify the correct Apache HTTP Server directives used to control access to resources based on client hostnames or IP addresses.
`restrict` is not a standard Apache access control directive for host/domain/IP filtering.
In Apache configuration, the `order`, `allow from`, and `deny from` directives are used together to define the sequence of access control checks and to specify which hosts or domains are permitted or denied access. For example, `order deny,allow` followed by `deny from all` and `allow from 192.168.1.0/24`.
`deny` and `accept` are not the correct pair of directives; `deny from` and `allow from` are used.
While the concept is right, `allow IP`, `deny IP`, `allow DOMAIN`, and `deny DOMAIN` are not the exact directive names used in Apache. The correct syntax uses `allow from` and `deny from` followed by the IP or domain.
`deny` and `accept` are not the correct pair of directives; `deny from` and `allow from` are used.
Concept tested: Apache host-based access control
Source: https://httpd.apache.org/docs/2.4/mod/mod_access_compat.html
Topics
Community Discussion
No community discussion yet for this question.