Which of the following statements is true about requests to the directory?

In order to protect a directory on an Apache HTTPD web server with a password, this configuration was added to an . htaccess file in the respective directory:

Furthermore, a file /var/www/dir/ . htpasswd was created with the following content:
usera:S3cr3t
Given that all these files were correctly processed by the web server processes, which of the following statements is true about requests to the directory?
A. The user usera can access the site using the password s3cr3t
B. Accessing the directory as usera raises HTTP error code 442 (User Not Existent)
C. Requests are answered with HTTP error code 500 (Internal Server Error)
D. The browser prompts the visitor for a username and password but logins for usera do not seem to work
E. The web server delivers the content of the directory without requesting authentication

Download Printable PDF. VALID exam to help you PASS.

4 thoughts on “Which of the following statements is true about requests to the directory?

  1. D is correct.

    The AllowOverride options does not matter because in the “Protected Directory” section it has “Require valid-user”

    1. Smartass is right, E should be the correct answer.

      https://httpd.apache.org/docs/2.4/howto/auth.html

      The directives discussed in this article will need to go either in your main server configuration file (typically in a section), or in per-directory configuration files (.htaccess files).

      If you plan to use .htaccess files, you will need to have a server configuration that permits putting authentication directives in these files. This is done with the AllowOverride directive, which specifies which directives, if any, may be put in per-directory configuration files.

      Since we’re talking here about authentication, you will need an AllowOverride directive like the following:

      AllowOverride AuthConfig

  2. Correct answer should be E.
    A isnt a valid answer because password must be encrypted with htpasswd. Option htpasswd -p (plaintext) only will work with Netware or Windows.
    D would be a valid answer if we have read that AllowOverride All is set in main configuration apache2 file but it doesnt say so we must supose it is in default value: AllowOverride None so it wont work authentication and the web server will deliver the content of the directory without requesting authentication.

    2
    3

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.