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. 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 52. 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. 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. 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. 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. 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.com7. 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.