nerdexam
CompTIA

LX0-104 · 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 an Apache <Directory /> block globally disables the use of .htaccess files for directory-specific configuration, improving security and performance.

Security

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

(40 responses)
  • A
    5% (2)
  • B
    3% (1)
  • C
    78% (31)
  • D
    15% (6)

Why each option

The `AllowOverride None` directive within an Apache `<Directory />` block globally disables the use of `.htaccess` files for directory-specific configuration, improving security and performance.

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

While `AllowOverride None` can indirectly affect user home directories, its direct purpose is to control `.htaccess` file processing, not specifically to stop serving HTML files from home directories.

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

This directive does not prevent HTML files from being served from the root directory; it only prevents `.htaccess` files from being processed within that directory and its subdirectories.

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

The `AllowOverride None` directive, when set in a `<Directory />` block, globally prevents Apache from looking for or processing `.htaccess` files in any directory. This centralizes configuration control to the main server files, enhancing security by disallowing user-defined overrides of server settings unless explicitly enabled elsewhere.

DIt prevents CGI scripts from modifying apache features dynamically.

`AllowOverride None` is specific to `.htaccess` files and the directives they contain, not directly about preventing CGI scripts from modifying Apache features dynamically.

Concept tested: Apache AllowOverride directive and .htaccess files

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

Topics

#Apache configuration#.htaccess#web server security

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice