You don't have permission to access this resource. mac code example
Example 1: You don't have permission to access this resource.
$ sudo systemctl restart apache2
Example 2: You don't have permission to access this resource.
In Apache’s main configuration file /etc/apache2/apache2.conf, ensure that you
have this block of code:
<VirtualHost *:80>
....
<Directory /var/www/html/PATH_TO_DIR/>
AllowOverride All
Require all granted
</Directory>
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
.....
.....
</VirtualHost>
Save and exit and thereafter, restart the Apache.
sudo systemctl restart apache2