nerdexam
Linux_Foundation

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.

Submitted by chen.hong· Apr 18, 2026Service Configuration

Question

In apache configuration which directives are used to restrict access based on host/domain name and IP address?

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)
  • B
    95% (18)
  • D
    5% (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.

Arestrict and allow

`restrict` is not a standard Apache access control directive for host/domain/IP filtering.

Border, allow from and deny fromCorrect

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`.

Cdeny and accept

`deny` and `accept` are not the correct pair of directives; `deny from` and `allow from` are used.

Dallow IP, deny IP, allow DOMAIN and deny DOMAIN

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.

Eorder, deny and accept

`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

#Apache HTTP Server#Access Control#Web Server Configuration#Directives

Community Discussion

No community discussion yet for this question.

Full LFCS Practice