Apache

Apache AH01630: client denied by server configuration: causes and fix

Fix Apache AH01630 client denied by server configuration on Apache 2.4. Find the Require rule that blocks access, fix it, and confirm with a test request.

AH01630: client denied by server configuration

In short

AH01630 is an Apache HTTP Server authorization error. Apache 2.4 refused a request because an access rule, usually a Require directive, did not allow the client. The browser sees 403 Forbidden. The error log names the file or directory that was denied. It most often appears after an upgrade from Apache 2.2 or when a directory has no Require rule.

Likely causes

  • •Old Apache 2.2 access rules (Order, Allow, Deny) left in the config. Apache 2.4 uses Require, not Order/Allow/Deny. Look for 'Order allow,deny' or 'Deny from all' in your vhost, .htaccess or conf files. Run: grep -rnE 'Order|Allow from|Deny from' /etc/apache2 /etc/httpd. This is the most common cause after a server upgrade or a copied config.
  • •The directory has 'Require all denied' or no 'Require all granted'. The default config often denies access to / and only opens specific paths. If your DocumentRoot lives outside /var/www (for example /srv/app/public), no rule opens it. The error log shows the exact path that was denied, and that path has no matching Directory block with 'Require all granted'.
  • •A Require ip or Require host rule that does not match the visitor. A rule such as 'Require ip 127.0.0.1' only lets that address in. This is likely if only some visitors get 403. Behind a proxy or CDN, Apache sees the proxy address, not the visitor. Check for mod_remoteip if you use one.
  • •Conflicting Require rules inside RequireAll, RequireAny or nested blocks. A RequireAll block needs every rule to pass, so one failing rule denies the request. Mixed rules in a Directory block, a Location block and an .htaccess file can merge in surprising ways. Look for several matching blocks for the same path.
  • •Wrong file permissions or SELinux on the document root. These usually log a different message, such as AH00035 for missing search permissions on a directory, but they also return 403 and are easy to confuse with this error. If the Require rules look correct, check that the Apache user can read every parent directory. On RHEL-family systems, check the SELinux context with ls -Z.
  • •A control panel such as Plesk rewrote or added its own rules. On Plesk, per-domain config is generated into files under /var/www/vhosts/system/example.com/conf/. Edits made directly to generated files are overwritten. Extra directives belong in the domain's Apache and nginx settings in the Plesk panel.

How to fix it

  1. 1. Read the error log to find the exact path that was denied

    The AH01630 line ends with the file or directory Apache refused. Note it. Every later step depends on this path. The log is /var/log/apache2/error.log on Ubuntu and Debian, and /var/log/httpd/error_log on RHEL-family systems.

    # Ubuntu / Debian
    sudo grep AH01630 /var/log/apache2/error.log | tail -n 5
    
    # RHEL / Rocky / Alma
    sudo grep AH01630 /var/log/httpd/error_log | tail -n 5
  2. 2. Find the rules that apply to that path

    Search the config for Directory blocks, Require lines and old 2.2 directives. Check .htaccess files in the site too, if AllowOverride is enabled.

    # Ubuntu / Debian
    sudo apachectl -S
    sudo grep -rnE 'Require|Order |Allow from|Deny from|<Directory' /etc/apache2/sites-enabled /etc/apache2/conf-enabled /etc/apache2/apache2.conf
    
    # RHEL / Rocky / Alma
    sudo grep -rnE 'Require|Order |Allow from|Deny from|<Directory' /etc/httpd/conf /etc/httpd/conf.d
    
    # .htaccess files in the site (change the path)
    sudo find /var/www/example.com -name .htaccess -exec grep -nE 'Require|Order|Allow|Deny' {} +
  3. 3. Replace old 2.2 directives with Require

    Swap 'Order allow,deny' plus 'Allow from all' for 'Require all granted'. Swap 'Deny from all' for 'Require all denied'. Do not mix the two styles in one block. Back up the file before you edit it.

    # Before (Apache 2.2 style)
    <Directory /var/www/example.com/public>
        Order allow,deny
        Allow from all
    </Directory>
    
    # After (Apache 2.4 style)
    <Directory /var/www/example.com/public>
        Require all granted
    </Directory>
  4. 4. Open the document root if it sits outside the default path

    If the denied path is outside /var/www, add a Directory block for it inside your vhost. Use the real path from the error log. Only grant access to the folder that serves the site, never to / or your whole home directory.

    <VirtualHost *:80>
        ServerName example.com
        DocumentRoot /srv/app/public
        <Directory /srv/app/public>
            Options -Indexes +FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>
    </VirtualHost>
  5. 5. Fix IP-based rules if only some visitors are blocked

    Add the missing address or range to the Require ip line, or use 'Require all granted' if the site is meant to be public. Use documentation ranges only as examples. Behind a proxy or CDN, enable mod_remoteip so Apache sees the real client address.

    <Directory /var/www/example.com/admin>
        Require ip 127.0.0.1 192.0.2.0/24
    </Directory>
  6. 6. Check permissions and SELinux if the rules already look right

    The Apache user (www-data on Ubuntu and Debian, apache on RHEL-family) needs execute permission on every parent directory and read permission on the files. On RHEL-family systems, web content needs the httpd_sys_content_t label. Do not run chmod -R 777 as a fix.

    # Show permissions on every directory in the path
    namei -l /var/www/example.com/public/index.php
    
    # RHEL-family: show and restore the SELinux context
    ls -Zd /var/www/example.com/public
    sudo restorecon -Rv /var/www/example.com
  7. 7. Test the config, then reload Apache

    Run the syntax test first. A reload applies the change without dropping active connections. Avoid a full restart unless a reload does not pick up the change. On Plesk, make the change in the domain's Apache settings in the panel, then let Plesk rebuild the config.

    # Ubuntu / Debian
    sudo apache2ctl configtest && sudo systemctl reload apache2
    
    # RHEL / Rocky / Alma
    sudo apachectl configtest && sudo systemctl reload httpd

Confirm it is fixed

Request the page that failed and check the status code. A 200 (or a 301/302 redirect to a working page) means access is allowed. Then confirm that no new AH01630 lines appear in the error log. Use your real domain in place of example.com.

curl -sI http://example.com/ | head -n 1

# Ubuntu / Debian
sudo tail -n 20 /var/log/apache2/error.log | grep AH01630 || echo 'no new AH01630 lines'

# RHEL / Rocky / Alma
sudo tail -n 20 /var/log/httpd/error_log | grep AH01630 || echo 'no new AH01630 lines'

How Opservo catches it early

The Opservo agent tails Apache logs, groups repeated lines into normalised patterns (raw log lines are never stored) and raises a recurring error finding with a plain-English AI summary when a pattern like AH01630 keeps coming back.

Last updated 2026-11-30.

FAQ

Related questions

Is AH01630 the same as a 403 Forbidden error?+

AH01630 is the log message behind a 403 Forbidden response. The browser shows 403, and Apache writes AH01630 to the error log to say a Require rule denied the request.

Can I just add 'Require all granted' everywhere?+

No. Add it only to the Directory block that serves your site. Granting access to / or to a wide parent directory can expose files you did not mean to publish.

Why did this start after I upgraded Apache?+

Apache 2.4 replaced the Order, Allow and Deny directives with Require. Configs written for 2.2 may deny everything on 2.4 or fail to load, so update them to the Require style.

Why does the error come back on Plesk after I fix it?+

Plesk regenerates its Apache config files and overwrites hand edits. Put custom directives in the domain's Apache settings in the Plesk panel so they survive a rebuild.

AH01630: client denied by server configuration · Opservo