LFCS Service Configuration Practice Question
A company runs an Apache HTTP server hosting multiple virtual hosts on a single server. The server is managed by systemd. After editing the configuration file for one of the virtual hosts, the administrator notices that the entire Apache service fails to start with a syntax error. Other virtual hosts are currently down because the service failed. The administrator must resolve the issue with minimal downtime and without affecting the configuration of the working virtual hosts. Which course of action is most appropriate?
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
✓
Run 'apachectl configtest' to validate all configurations, fix any reported errors, then run 'systemctl reload httpd'.
Using apachectl configtest to validate the configuration before restarting is the safest approach. It identifies syntax errors without affecting running services. Then the fix can be applied and a reload (or restart) performed. Option A ignores validation and restarts, causing potential additional downtime if the error persists. Option B also restarts without validation. Option D disables the problematic site, but that may not be desired if the site is needed.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Check the Apache error log to identify the syntax error, fix the configuration, and run 'systemctl restart httpd'.
Why it's wrong here
Restarting blindly without validation may cause repeated failures; better to test first.
- ✗
Run 'systemctl restart httpd' immediately to apply the change; the error will be logged.
Why it's wrong here
This attempts a restart without checking syntax first, risking prolonged downtime.
- ✓
Run 'apachectl configtest' to validate all configurations, fix any reported errors, then run 'systemctl reload httpd'.
Why this is correct
Correct: configtest checks syntax without starting; reload applies changes without full restart, minimizing downtime.
- ✗
Disable the problematic virtual host file by renaming it, then restart Apache to bring up the other sites.
Why it's wrong here
While this restores other sites, it disables the needed site and is not a proper fix.
Visual reference
Go deeper
Related to this question
About these practice questions
One of 507 original LFCS 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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LFCS practice question is part of Courseiva's free Linux Foundation 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 LFCS exam.