After I installed apache2 and ran it, the default HTML page of apache2 works fine. Then I installed PHP 5.6 and restarted apache2 and created PHP file in /var/www/html
called info.php
and put <?php echo 'hello word!' ; ?>
in it and ran it on Firefox. As the result it says forbidden, I have tried to change the permission for www
directory and it gave me the same error.
1 Answer
in /etc/apache2/apache2.conf
add Require all granted
to the directories you want to grant access to like this
<Directory "your directory here">
Order allow,deny
Allow from all
Require all granted
</Directory>
Then restart apache2
service and go to http://localhost/info.php .
ll /var/www/html/info.php