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
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
AllowOverrideListis 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
Orderdirective, along with the
Denydirectives, controls a three-pass access control system. The first pass processes either all
Denydirectives, as specified by the
Orderdirective. The second pass parses the rest of the directives (
Allow). The third pass applies to all requests which do not match either of the first two.
Allow from all: The
Allowdirective 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 allis specified, then all hosts are allowed access, subject to the configuration of the
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!
Facebook apologises after repeatedly restoring posts featuring stolen photos of children and posted claims they had cancer.A guided tour of the cybercrime undergroundPosted on Wednesday February 22, 2017
Malware researcher Anton talks about who does what in the web's dark marketplaces.Mouse trap triggers internet alertsPosted on Wednesday February 22, 2017
A pest control company develops a mouse trap that connects to the internet.Courtesy BBC News