LFCS · Question #228
The local system administrator has created a configuration entry for apache version 2 that isn't working. What is wrong with the following configuration? <Location /members> AuthName Members…
The correct answer is A. The directive require validuser is missing. The provided Apache configuration for basic authentication is incomplete because it lacks a directive to actually require authentication for the specified location.
Question
Options
- AThe directive require validuser is missing.
- BBasic Authentication has been removed from Apache 2.x.
- CThe format of the password file is not specified.
- DThe AuthUserFile must be in the apache configuration directory.
How the community answered
(19 responses)- A79% (15)
- B5% (1)
- C5% (1)
- D11% (2)
Why each option
The provided Apache configuration for basic authentication is incomplete because it lacks a directive to actually require authentication for the specified location.
While `AuthName`, `AuthType`, and `AuthUserFile` define *how* authentication is done, the `require` directive (e.g., `require valid-user` or `require user <username>`) is explicitly needed to *enforce* the authentication for the `<Location>` block. Without it, Apache knows how to authenticate but isn't told to do so.
Basic authentication is a fundamental feature and is very much present and supported in Apache 2.x and later versions.
The format of the password file (`AuthUserFile`) is implicitly standard for Apache (typically `htpasswd` format) and does not need to be explicitly specified within the configuration block.
The `AuthUserFile` can be located anywhere on the file system that the Apache user has read access to; it does not specifically need to be within the Apache configuration directory.
Concept tested: Apache Basic Authentication configuration
Source: https://httpd.apache.org/docs/2.4/howto/auth.html
Topics
Community Discussion
No community discussion yet for this question.