ApacheApache

When you have installed an Apache server , the following message may appear on your browser if you try to access a page:

<p>
403 Forbidden You don't have permission to access / on this server
</p>

This error is a problem related to access. The access configuration takes place in the httpd-vhosts.conf file. The Directory block is used to configure access to the various directories on the server. By default, there is only one for the root directory (/) and the setting made on this block is applied to all subdirectories.

The first element of this block to modify is access management. For a server in a version earlier than version 2.4, it is possible that Apache by default prohibits access to the server:

<p>
Options FollowSymLinks AllowOverride All Order deny, allow Deny from all
</p>

Order deny, allow direction indicates that deny directives take precedence over allow directives. It is the second deny from all directive that prohibits access for all. To correct this problem, if you are on a development server, which does not host an online website, simply replace the second directive with the allow from all directive. If you are on an online server, we recommend that you create a Directory block with the path to your directory and then allow access:

<p>
Allow from all </p>

If you use an Apache server in version 2.4 or more recent, the module which manages the authorizations has changed: it is the mod_authz_host module. The guidelines for allowing or denying access are no longer the same. They have to be changed.

<p>
Options FollowSymLinks AllowOverride All Require all denied Require all granted
</p>

If you have migrated from an earlier version of Apache , follow the foundation guide to correct the server configuration: https://httpd.apache.org/docs/2.4/upgrading.html.

If the problem is not resolved, another solution is to replace the FollowSymLinks Options directive with Options Indexes FollowSymLinks Includes ExecCGI.