Apache 403 Forbidden — Access Denied

WebServerErrors Apache Reconnaissance / Access Violation

What This Means

Diagnose Apache HTTP 403 Forbidden errors. Detect unauthorized access attempts, .htaccess misconfigurations, and mod_security blocks on your Apache web server.

Example Log

203.0.113.55 - - [08/Mar/2026:15:30:12 +0000] "GET /.env HTTP/1.1" 403 498 "-" "python-requests/2.28.0"

Indicators of Suspicious Activity

How to Investigate

  1. Check the Apache error log for the specific reason (file permissions, .htaccess, mod_security)
  2. Review mod_security audit log for rule IDs that triggered the block
  3. Verify file and directory permissions match Apache user expectations
  4. Test .htaccess rules for unintended blocking of legitimate requests
  5. Correlate source IPs with other error codes and threat intelligence
  6. Check if mod_security is running in DetectionOnly mode or blocking mode

Recommended Mitigations

Scan This Log Instantly

Paste a suspicious log line below and get an instant AI-powered security assessment.

0 / 2000

Need a Full Investigation?

Scan entire log files, detect attack patterns, reconstruct timelines, and generate a full investigation report.

Run Smart Scan

Related Log Types

Related Attack Patterns

Frequently Asked Questions

What causes Apache 403 Forbidden errors?
Apache returns 403 when access is denied by file permissions, .htaccess rules, Require directives, mod_security rules, or Options -Indexes on directories without an index file.
How do I check why Apache returned 403?
Check the Apache error log (usually /var/log/apache2/error.log). It will show the specific reason: client denied by server configuration, file permissions, or mod_security rule match.
What is mod_security and how does it cause 403s?
mod_security is a web application firewall module for Apache. It inspects requests against rule sets (like OWASP CRS) and returns 403 when a request matches a known attack pattern.