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.
Question
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)- A5% (2)
- B3% (1)
- C78% (31)
- D15% (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.
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.
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.
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.
`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
Community Discussion
No community discussion yet for this question.