nerdexam
Linux_Foundation

LFCS · Question #381

The apache administrator has added the following lines to the configuration files: <Directory /> AllowOverride None </Directory> What is the purpose of this directive?

The correct answer is C. It stops users from setting up .htaccess files unless specifically allowed in additional configuration. The AllowOverride None directive within a <Directory /> block globally disables the processing of .htaccess files for directory-specific configuration overrides.

Submitted by fatima_kr· Apr 18, 2026Service Configuration

Question

The apache administrator has added the following lines to the configuration files: <Directory /> AllowOverride None </Directory> What is the purpose of this directive?

Options

  • AIt stops users from serving HTML files from their home directories.
  • BIt prevents HTML files from being served out of the / directory.
  • CIt stops users from setting up .htaccess files unless specifically allowed in additional configuration.
  • DIt prevents CGI scripts from modifying apache features dynamically.

How the community answered

(33 responses)
  • A
    3% (1)
  • C
    94% (31)
  • D
    3% (1)

Why each option

The `AllowOverride None` directive within a `<Directory />` block globally disables the processing of `.htaccess` files for directory-specific configuration overrides.

AIt stops users from serving HTML files from their home directories.

`AllowOverride None` does not specifically prevent serving HTML files from home directories; rather, it prevents `.htaccess` files from being used to enable such serving (e.g., via `UserDir` directives).

BIt prevents HTML files from being served out of the / directory.

This directive prevents `.htaccess` files from being used in the `/` directory and its subdirectories, not HTML files from being served directly from `/`. Serving files from `/` is controlled by other directives like `DocumentRoot`.

CIt stops users from setting up .htaccess files unless specifically allowed in additional configuration.Correct

The `AllowOverride` directive explicitly controls which directives placed in `.htaccess` files are allowed to override server configuration for a given directory. Setting `AllowOverride None` for the root directory (`/`) means that no `.htaccess` files anywhere will be processed, effectively preventing users from setting up local configuration overrides unless specifically re-enabled in subdirectories.

DIt prevents CGI scripts from modifying apache features dynamically.

While CGI scripts can be enabled or disabled via `.htaccess`, `AllowOverride None` itself prevents *any* `.htaccess` file from functioning, which indirectly affects CGI if they rely on `.htaccess` for configuration, but its primary purpose is not *only* about CGI scripts modifying Apache features dynamically.

Concept tested: Apache .htaccess file control

Source: https://httpd.apache.org/docs/2.4/mod/core.html#allowoverride

Topics

#Apache#Web Server#Configuration#.htaccess

Community Discussion

No community discussion yet for this question.

Full LFCS Practice