mediumMultiple ChoiceObjective-mapped
XK0-006 Practice Question: An Apache web server hosted on a Linux system is…
Network Topology
An Apache web server hosted on a Linux system is unable to connect to a backend database server on port 3306. Based on the exhibit, which action should the administrator take to resolve the issue?
⚠ Common exam trap
CompTIA often tests the misconception that SELinux issues are always file-context problems, leading candidates to choose a file-context fix (Option D) when the actual issue is a network connection boolean.
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
✓
Set the httpd_can_network_connect boolean to on.
The Apache web server cannot connect to the backend database server on port 3306 because SELinux is blocking the outbound network connection. The boolean `httpd_can_network_connect` controls whether the httpd daemon is allowed to initiate outbound TCP connections to remote hosts. Setting this boolean to `on` permits Apache to connect to the database server, resolving the connectivity issue without disabling SELinux entirely.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Set the httpd_can_network_connect boolean to on.
Why this is correct
This boolean controls whether httpd can initiate outbound network connections.
- ✗
Disable SELinux by setting SELINUX=disabled in /etc/selinux/config.
Why it's wrong here
Disabling SELinux is not a best practice and is unnecessary; the boolean can be changed.
- ✗
Enable the httpd_enable_home_dirs boolean.
Why it's wrong here
This boolean allows Apache to access home directories, not network connections.
- ✗
Change the SELinux context of the index.html file to httpd_sys_content_t.
Why it's wrong here
The file already has the correct context; this is not related to outbound connections.
Visual reference
Go deeper
Related to this question
About these practice questions
One of 979 original XK0-006 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 XK0-006 practice question is part of Courseiva's free CompTIA 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 XK0-006 exam.