How to solve Apache Error: Forbidden you don't have permission to access / on this server?

I encountered Forbidden You don't have permission to access / on this server error, while setting up apache and php on my home PC. This is mainly a permission issue. In order to get rid of this error you should check if the directory pointed by <DocumentRoot> and its subdirectories have read permission and in httpd.conf file, Allow from directive has been appropriately configured for access control.

By default, you might see the global directory settings in httpd.conf file as follows

# Each directory to which Apache has access can 
# be configured with respect to which services 
# and features are allowed and/or disabled in that
# directory (and its subdirectories). 
# First, we configure the "default" to be a very 
# restrictive set of features.  
<Directory />
  Options FollowSymLinks
  AllowOverride None
  Order deny,allow
  Deny from all		#This line causes forbidden you don't have permission to access / on this server
</Directory >

In above block replace Deny from all to Allow from all, save changes, restart the server and you are done with forbidden you don't have permission to access / on this server error! See the snippet as follows.

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Allow from all
</Directory >

If you are interested reading what all entries enclosed within <Directory /> directive are doing, here is a short description:

  • Options FollowSymLinks: The server will follow symbolic links in this directory. This is the default setting.
  • AllowOverride None: When this directive is set to None and AllowOverrideList is set to None .htaccess, files are completely ignored. In this case, the server will not even attempt to read .htaccess files in the filesystem.
  • Order deny,allow: The Order directive, along with the Allow and Deny directives, controls a three-pass access control system. The first pass processes either all Allow or all Deny directives, as specified by the Order directive. The second pass parses the rest of the directives (Deny or Allow). The third pass applies to all requests which do not match either of the first two.
  • Allow from all: The Allow directive affects which hosts can access an area of the server. Access can be controlled by hostname, IP address, IP address range, or by other characteristics of the client request captured in environment variables. The first argument to this directive is always from. The subsequent arguments can take three different forms. If Allow from all is specified, then all hosts are allowed access, subject to the configuration of the Deny and Order directives.

Last Word

Hope you have enjoyed reading this answer for forbidden you don't have permission to access / on this server. Please do write us if you have any suggestion/comment or come across any error on this page. Thanks for reading!

Get Free Tutorials by Email

About the Author

is the main author for He is a software professional (post graduated from BITS-Pilani) and loves writing technical articles on programming and data structures.

Today's Tech News

UK regulator has 'huge concerns' over Uber breachPosted on Wednesday November 22, 2017

A data breach affecting 57 million customers and drivers should not have been concealed, the information commissioner says.

Android phones 'betray' user location to GooglePosted on Wednesday November 22, 2017

The devices send location data back to Google even when location services are switched off.

Budget 2017: Funding for AI, 5G and digital skillsPosted on Wednesday November 22, 2017

The chancellor acknowledged the digital revolution would change the way people lived and worked.

Courtesy BBC News


Advertisements help running this site for free.

To view the content please disable AdBlocker and refresh the page.