XK0-006 Security Practice Question
An administrator needs to configure SELinux to allow the Apache HTTP server to connect to a database server. Which SELinux boolean should be enabled?
⚠ Common exam trap
A common pitfall in SELinux configuration is confusing the general network connect boolean (`httpd_can_network_connect`) with the database-specific boolean (`httpd_can_network_connect_db`). In this scenario, the database-targeted boolean is required.
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
✓
httpd_can_network_connect_db
The SELinux boolean `httpd_can_network_connect_db` specifically allows the Apache HTTP server to make outbound TCP connections to database servers (e.g., MySQL, PostgreSQL). This is required when a web application needs to query a remote database. The other booleans control different aspects of httpd's behavior and do not grant network connectivity to databases.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
httpd_can_network_connect
Why it's wrong here
This allows general network connections, but for databases, there is a more specific boolean.
- ✗
httpd_enable_cgi
Why it's wrong here
This boolean allows CGI scripts, not network connections.
- ✗
httpd_use_nfs
Why it's wrong here
This boolean allows Apache to use NFS mounts, not database connections.
- ✓
httpd_can_network_connect_db
Why this is correct
This boolean specifically allows Apache to connect to database servers.
Visual reference
Go deeper
Related to this question
About these practice questions
This XK0-006 question is part of Courseiva's 979-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.