📖 ~1 min read
Table of contents
Symptom & Impact
httpd serves 403 errors or cannot read content despite correct UNIX permissions.
Environment & Reproduction
Check mode with `getenforce` and inspect labels with `ls -Z /var/www/html`.
Root Cause Analysis
Confirm SELinux tooling is present: `dnf install policycoreutils-python-utils setools-console`.
Quick Triage
Verify `systemctl status httpd` and confirm it is running under the expected context.
Step-by-Step Diagnosis
Read AVC events using `journalctl -t setroubleshoot –since -2h` or `ausearch -m AVC -ts recent`.

Solution – Primary Fix
Relabel content via `restorecon -Rv /var/www/html` and add booleans or contexts only as required.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches
Ensure `firewalld` allows `http` and `https` services for remote access validation.
Verification & Acceptance Criteria
Keep SELinux enforcing and retest; avoid disabling policy for permanent fixes.
Rollback Plan
Reboot and verify labels and booleans remain correct using `semanage fcontext -l | grep httpd`.
Prevention & Hardening
Apply correct contexts during deployment and avoid copying content without preserving labels.
Related Errors & Cross-Refs
Remove overly broad custom rules and restore default contexts if security posture was weakened.
Related tutorial: View the step-by-step tutorial for rhel-9.
View all rhel-9 tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Review SELinux httpd policy docs and `man semanage` for safe adjustments.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.