Back to blog
Linux & Servers Published September 25, 2026•Updated November 10, 2026

Apache "client denied by server configuration" (AH01630): Fix

Automate WhatsApp Alerts
Start Free āž”

When browsing a web application hosted on Apache HTTP Server 2.4, requests frequently fail with HTTP 403 Forbidden. In Apache's error logs, the rejection is accompanied by one of two core authorization errors:

[authz_core:error] [pid 1234:tid 5678] [client 203.0.113.10:54321] AH01630: client denied by server configuration: /var/www/html/index.php
[access_compat:error] [pid 1234:tid 5678] [client 203.0.113.10:54321] AH01797: client denied by server configuration: /var/www/html/.htaccess

Quick fix: Apache's own rules refused the request: no <Directory> block grants access to that path. This usually happens when the DocumentRoot is outside /var/www (for example /srv/site or /home/user/site), because the default config denies everything under / and only opens /var/www. Grant access to your site's folder and reload:

<Directory /srv/site>
    Require all granted
</Directory>
sudo apachectl configtest && sudo systemctl reload apache2   # httpd on RHEL-based systems

Which error do you have?

  • AH01630 (authz_core): no Require rule allowed the request. Use the fix above.
  • AH01797 (access_compat): an old Apache 2.2 rule (Order, Deny from) denied it, often in a .htaccess file. See section 3.
  • AH00132 or (13)Permission denied: Apache was allowed, but Linux file permissions or SELinux blocked the read. See sections 4 and 5.

The error message specifically states that access was denied by "server configuration", not the underlying filesystem. While Unix file permissions (chmod / chown) and SELinux contexts can prevent Apache from reading files on disk, AH01630 indicates that Apache's own authorization engine (mod_authz_core) evaluated the request and explicitly denied access.

This guide details the architectural authorization shift between Apache 2.2 and 2.4, provides step-by-step fixes for <Directory>, .htaccess, SELinux, and reverse proxies, and outlines automated monitoring workflows.

[!TIP] Free Diagnostic Tools for Webmasters & SREs:


1. Architectural Root Cause: The Apache 2.2 to 2.4 Migration

Apache 2.4 replaced the 2.2 rules (Order, Allow, Deny) with Require. The old rules still work when mod_access_compat is loaded (it is by default on most distributions), but mixing old and new rules for the same path makes the result hard to predict. The most common trigger for AH01630 is a site folder that no <Directory> block grants, typically a DocumentRoot outside /var/www.

                    APACHE 2.4 AUTHORIZATION PIPELINE
 ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
 │ 1. Inbound HTTP Request Received                       │
 ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
                            │
                            ā–¼
 ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
 │ 2. Match VirtualHost & Location Directives             │
 ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
                            │
                            ā–¼
 ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
 │ 3. Evaluate <Directory> & .htaccess Authorization      │
 ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
                            │
                            ā–¼
              ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
              │ mod_authz_core Decision?  │
              ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
                     │              │
             Require all granted   Require all denied / No match
                     │              │
                     ā–¼              ā–¼
           ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”  ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
           │ Check OS / Unix  │  │ āŒ ABORT: HTTP 403 Forbidden    │
           │ Filesystem Perms │  │ Log: AH01630 client denied      │
           ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜  ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

In Apache 2.4, access control is managed by mod_authz_core using provider-based Require rules. If an upgraded server lacks a matching Require all granted directive, Apache's secure default (Require all denied) halts the request before reading files on disk.


2. Comparative Matrix: Apache 2.2 vs Apache 2.4 Directives

ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│ Authorization Scenario       │ Legacy Apache 2.2 Syntax      │ Modern Apache 2.4 Syntax      │
ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤
│ Grant Access to Everyone     │ Order allow,deny              │ Require all granted           │
│                              │ Allow from all                │                               │
ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤
│ Deny Access to Everyone      │ Order deny,allow              │ Require all denied            │
│                              │ Deny from all                 │                               │
ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤
│ Restrict by Single IP        │ Order deny,allow              │ Require ip 192.168.1.50       │
│                              │ Deny from all                 │                               │
│                              │ Allow from 192.168.1.50       │                               │
ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤
│ Restrict by Subnet / CIDR    │ Allow from 10.0.0.0/24        │ Require ip 10.0.0.0/24        │
ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤
│ Combining Access Logic       │ Complex Order mixing          │ <RequireAll> / <RequireAny>   │
ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤
│ Underlying Core Module       │ mod_authz_host                │ mod_authz_core                │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

Boolean Authorization Logic in Apache 2.4

Apache 2.4 can combine rules with containers:

  • <RequireAll>: every rule inside must pass (AND).
  • <RequireAny>: at least one rule inside must pass (OR). This is the default when several Require lines sit side by side.
<RequireAll>
    Require ip 10.0.0.0/8
    Require valid-user
</RequireAll>

3. Step-by-Step Fixes for AH01630

1. Fix the <Directory> Block in VirtualHost Configuration

Open your site configuration file (e.g., /etc/apache2/sites-available/example.conf or /etc/httpd/conf.d/example.conf) and replace legacy 2.2 directives with Require all granted:

# āŒ BROKEN: Legacy Apache 2.2 syntax triggers AH01630 on Apache 2.4
<VirtualHost *:80>
    ServerName example.com
    DocumentRoot /var/www/html

    <Directory /var/www/html>
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
# āœ… FIXED: Production-ready Apache 2.4 configuration
<VirtualHost *:80>
    ServerName example.com
    ServerAlias www.example.com
    DocumentRoot /var/www/html

    <Directory /var/www/html>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/example_error.log
    CustomLog ${APACHE_LOG_DIR}/example_access.log combined
</VirtualHost>

2. Resolve Root Filesystem Lockdown Conflicts

Default Apache distributions (such as Debian's /etc/apache2/apache2.conf or RHEL's /etc/httpd/conf/httpd.conf) enforce root filesystem lockdown:

# Global root lockdown (DO NOT REMOVE)
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Require all denied
</Directory>

[!CAUTION] Never change <Directory /> to Require all granted. Doing so exposes system files like /etc/passwd to web exploits. Instead, explicitly declare Require all granted for your specific document root (e.g., <Directory /var/www/html>).


3. Fix Conflicting .htaccess Directives

If AllowOverride All is active, rules inside .htaccess can override your virtual host declarations:

  1. Search for .htaccess files:

    find /var/www/html -name ".htaccess"
    
  2. Inspect for legacy or explicit deny rules:

    # āŒ BROKEN in .htaccess:
    Order deny,allow
    Deny from all
    
    # āœ… FIXED:
    Require all granted
    
  3. Protect Sensitive Files Safely:

    # āœ… Securely block access to .env and config files only
    <FilesMatch "^\.(env|git|htaccess|ini)$">
        Require all denied
    </FilesMatch>
    

4. Fix Linux Filesystem Permissions & Directory Traversal

If the log shows AH00132 or (13)Permission denied instead of AH01630, Apache's rules allowed the request but Linux refused the read. Apache must have execute (x) permission on every parent directory and read (r) permission on the file:

# 1. Audit path traversal permissions
namei -l /var/www/html/index.php

Ensure directories have 755 permissions and files have 644:

# 2. Fix directory and file permissions
sudo chown -R www-data:www-data /var/www/html    # Debian / Ubuntu
# sudo chown -R apache:apache /var/www/html      # RHEL / Rocky Linux

sudo find /var/www/html -type d -exec chmod 755 {} \;
sudo find /var/www/html -type f -exec chmod 644 {} \;

5. Fix SELinux Contexts (RHEL / Rocky / AlmaLinux / CentOS)

On SELinux-enforcing systems, Apache cannot read files that lack the httpd_sys_content_t security context. This also shows up as (13)Permission denied, not AH01630:

# 1. Inspect SELinux security labels
ls -laZ /var/www/html

# 2. Restore default httpd security contexts
sudo restorecon -Rv /var/www/html

# 3. For custom web directories outside /var/www:
sudo semanage fcontext -a -t httpd_sys_content_t "/srv/myapp/public(/.*)?"
sudo restorecon -Rv /srv/myapp/public

6. Fix Reverse Proxy <Proxy> Authorization

When using Apache as a reverse proxy, mod_proxy requires authorization inside a <Proxy> container:

# āœ… Production Reverse Proxy Authorization
<VirtualHost *:80>
    ServerName api.example.com

    ProxyRequests Off
    ProxyPreserveHost On

    ProxyPass        / http://127.0.0.1:8080/
    ProxyPassReverse / http://127.0.0.1:8080/

    <Proxy "*">
        Require all granted
    </Proxy>
</VirtualHost>

4. Validation Commands & Syntax Testing

Execute this verification sequence after updating your configuration:

# 1. Test Apache configuration syntax
sudo apachectl configtest

Expected Output: Syntax OK

# 2. Confirm authorization modules are loaded
apachectl -M | grep -E 'authz_core|authz_host'

# 3. Inspect virtual host bindings
sudo apachectl -S

# 4. Gracefully reload Apache
sudo systemctl reload apache2   # Debian / Ubuntu
# sudo systemctl reload httpd   # RHEL / Rocky Linux

# 5. Test HTTP 200 response via cURL
curl -vI http://example.com/

If curl still returns 403, read the newest error log line again: the code (AH01630, AH01797 or AH00132) tells you which section applies.


5. Catch a 403 before users report it

Authorization errors usually arrive with a deploy, a CMS update or a server migration: the site loads for you from cache, while new visitors get 403.

An HTTP monitor on your home page and one important inner page fails as soon as Apache starts returning 403. With Pingzo, checks run every 1 to 15 minutes depending on your plan, an incident opens when 3 of the last 5 checks fail, and alerts go to WhatsApp, Slack, Telegram, Discord or email.


Summary Troubleshooting Checklist

  1. Migrate 2.2 Directives: Replace Order allow,deny / Allow from all with Require all granted.
  2. Audit .htaccess: Inspect for restrictive Require all denied or Deny from all rules.
  3. Verify Permissions: Ensure directories are 755 (drwxr-xr-x) and owned by www-data or apache.
  4. Fix SELinux: Run restorecon -Rv /var/www/html to ensure httpd_sys_content_t context.
  5. Reload & Verify: Run sudo apachectl configtest && sudo systemctl reload apache2.

Related guides

Zero-Code Uptime Alerts

Stop Finding Out About Outages from Angry Users

Get instant WhatsApp & Discord alerts the second your API, website, or server goes down. Setup in 30 seconds, with checks as often as every minute.

WhatsApp & Discord 60-Second Checks Free Forever Plan
Try Pingzo Free

Know before your users do

Connect official WhatsApp notification channels, Discord webhooks, Telegram bots, and public status pages. Start in 30 seconds.

Create Free Monitor