1. Goal
Reduce Apache attack surface with minimal options, headers, and only the required modules.
2. Files and components involved
/etc/httpd/httpd.conf
apachectl
3. Operational flow
set ServerTokens Prod
ServerSignature Off
Options -Indexes
limit AllowOverride and loaded modules
4. Operational verification
apachectl -t
apachectl -M
curl -I http://127.0.0.1/
5. Practical notes
Apply these changes during a maintenance window and keep a backup of the original files for a quick rollback.
Tightening a policy without an alternative access path is the fastest way to lock out legitimate users as well.
Quick checklist
[ ] Backup or copy of the existing configuration completed
[ ] Files and commands updated as expected
[ ] Local test completed successfully
[ ] Logs or final output verified
[ ] Rollback procedure documented