Courseiva
File Sharing and SambamediumDrag & DropObjective-mapped

LPIC-2 DocumentRoot Practice Question

Arrange the steps to configure a Linux system as an Apache virtual host.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

1. Create document root, 2. Create site configuration, 3. Enable the site, 4. Reload Apache, 5. Test

The correct order to configure an Apache virtual host is: first, create the document root directory with appropriate permissions; second, create a site configuration file in /etc/apache2/sites-available/; third, enable the site using a2ensite; fourth, reload Apache with systemctl reload apache2; fifth, test by accessing the site. Option A follows this sequence. Option B is incorrect because the site configuration must be created before enabling. Option C is incorrect because enabling occurs after configuration creation. Option D is incorrect because reloading must happen after enabling.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • 1. Create document root, 2. Create site configuration, 3. Enable the site, 4. Reload Apache, 5. Test

    Why this is correct

    This is the correct order because the document root must exist before it is referenced in the site configuration, the configuration must exist before it can be enabled, Apache must be reloaded after enabling to apply changes, and testing verifies functionality.

  • 1. Create site configuration, 2. Create document root, 3. Enable the site, 4. Reload Apache, 5. Test

    Why it's wrong here

    This is incorrect because the site configuration may reference a document root that does not yet exist, causing errors when Apache tries to serve content.

  • 1. Create document root, 2. Enable the site, 3. Create site configuration, 4. Reload Apache, 5. Test

    Why it's wrong here

    This is incorrect because you cannot enable a site before its configuration file is created; the enable command references the configuration file.

  • 1. Create document root, 2. Create site configuration, 3. Reload Apache, 4. Enable the site, 5. Test

    Why it's wrong here

    This is incorrect because reloading Apache before enabling the site means the new site configuration is not yet active; a reload after enabling is required.

About these practice questions

One of 507 original LPIC-2 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LPIC-2 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-2 exam.