Web server security
Nginx and Apache Security Audit Fixes
TLS, security headers, exposed content and request handling.
These are the fixes for a web server security audit: what your TLS configuration accepts, which headers the browser receives, what the server will serve that it should not, and how much it reveals about itself.
- Checks documented
- 36
- Audits in this category
- 6
- Need root or sudo
- 8
- Rated high severity
- 8
For what these audits cover rather than how to fix them, see the Web Server security checklist, or how the CtrlOps Security Audit runs.
By audit
6 audits, 36 checks
Grouped by the 6 audits they belong to. TLS and content exposure come first: one governs whether traffic can be read, the other whether files can be fetched that were never meant to be public.
How much of this is serious?
8 high, 18 medium and 10 low severity checks- 01Security HeadersFixes soonHSTS, CSP, framing, MIME sniffing, referrer and permissions policy8 checks0 high, 5 medium and 3 low severity checks
- 02Configuration HardeningFixes soonFile permissions, web root ownership, request limits and modules6 checks · 2 need root2 high, 2 medium and 2 low severity checks
- 03Content ExposureFixes soonDirectory listing, hidden files, backups, methods and status endpoints6 checks · 2 need root1 high, 4 medium and 1 low severity checks
- 04TLS ConfigurationFixes soonProtocol versions, cipher suites, certificates and HTTPS redirection6 checks · 1 need root3 high, 2 medium and 1 low severity checks
- 05Identification & PatchingFixes soonServer inventory, version disclosure, worker privileges and pending updates5 checks · 1 need root2 high, 1 medium and 2 low severity checks
- 06Logging & MonitoringFixes soonAccess and error logging, log permissions, rotation and WAF presence5 checks · 2 need root0 high, 4 medium and 1 low severity checks
What these fixes cover
- TLS protocol versions, cipher suites, certificate expiry and the HTTP to HTTPS redirect
- HSTS, CSP, frame protection, CORS, referrer and permissions policy, and cookie flags
- Directory listing, dotfiles, backup files, status endpoints and default welcome pages
- Worker process user, version disclosure, request limits, rate limiting and log handling
What they do not
- Your application code. A perfect header set does not fix an injection flaw behind it.
- Headers added at a CDN or WAF edge. The probe runs from loopback, so edge-added headers are invisible and report as missing.
- Routes other than the site root. Only the first server_name and the path / are examined.
Keep going
The other three platforms
Most hosts run more than one of these. The split shows how much of each platform the audit rates as high severity.
This is the most common false positive in the section, and it has one cause: the probe runs against 127.0.0.1 from the server itself, so any header your CDN or WAF adds at the edge is invisible to it. It also only examines the root path of the first server_name. Confirm from outside with curl -I against your real hostname before changing anything.
Both. Every fix gives the Nginx directive and the Apache equivalent, because the audit detects whichever is installed. Caddy and lighttpd are detected as present but not configured by these fixes.
Content-Security-Policy will if you deploy a strict policy without testing, and HSTS is effectively irreversible for the duration of its max-age. Both pages cover the safe rollout: CSP in report-only mode first, HSTS with a short max-age before committing to a long one. The other headers are additive and safe.
When run as root the audit reads the fully resolved configuration (nginx -T), which follows every include. Without root it concatenates the main config, conf.d and sites-enabled instead, and can miss an include from elsewhere. It also never evaluates a config you have edited but not reloaded.
Stop juggling tools. Start managing fleets.
One app. All your servers. No context switching. Free to start, free to leave.
Start instantly · No credit card · Cancel anytime