After upgrading from Debian 7 to 8 and therefore from Apache 2.2 to 2.4, I'm facing some issues regarding php scripts. As the configuration files between the apache versions are not compatible, I did a fresh install of apache after the upgrade. While all .html files in /var/www/html are accessible, php scripts are not executed and return a 403 Permission denied
.
a2enmod php5
tells me that the php module is enable
The apache2.conf is absolutely standard and specifies:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
I've tried lots of different permissions on the php files themselves. For my test.php that should display phpinfo() they are currently set to -rwxr-xr-x
with the owner being www-data
, which is identical to the html files working and was most likely the user Apache 2.2 used.
The VirtualHost config coming with the new Apache is just the 000-default.conf
<VirtualHost *:80>
ServerName www.mydomain.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
</VirtualHost>