📖 ~1 min read
Table of contents
Symptom & Impact
httpd fails to start when configured on a non-standard port due to SELinux port type mismatch.
Environment & Reproduction
Seen after moving Apache to ports such as 8443 or 9090 without updating SELinux port labels.
Root Cause Analysis
http_port_t does not include the new port, so the targeted policy denies the bind operation.
Quick Triage
Inspect /var/log/audit/audit.log for AVC denials referencing name_bind and the chosen port.
Step-by-Step Diagnosis
Run: sudo ausearch -m AVC -ts recent | audit2why; sudo semanage port -l | grep http_port_t.

Solution – Primary Fix
Run: sudo semanage port -a -t http_port_t -p tcp 8443; sudo systemctl restart httpd.
Still having issues? Our IT Consulting team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches
Use a custom policy module from audit2allow when multiple ports or protocols are required.
Verification & Acceptance Criteria
httpd listens on the new port and no further AVC denials appear during startup.
Rollback Plan
Remove the port mapping with semanage port -d and revert httpd.conf Listen directives.
Prevention & Hardening
Keep an approved port label list and add SELinux port changes to provisioning automation.
Related Errors & Cross-Refs
Often combined with firewalld zone errors and missing http_port_t labels on similar services.
Related tutorial: View the step-by-step tutorial for centos-stream-10.
View all centos-stream-10 tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Red Hat SELinux User and Administrator guide and semanage(8) man page.
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.