Install GRAV in user directories on Debian 9 +Apache2+ PHP7.0

Several days ago, I made an upgrade on my Debian box. The PHP was upgraded to PHP7.0 and the pages in user directory $HOME/public_html are displayed as their PHP codes. It turned out

    Running PHP scripts in user directories is disabled by default

in /etc/apache2/mods-enabled/php7.0.conf. By changing last part of this file
and restart apache server. It worked. Hope this helpful for debian and/or Ubuntu
users.


# Running PHP scripts in user directories is disabled by default
#
# To re-enable PHP in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
<IfModule mod_userdir.c>
    <Directory /home/*/public_html>
#        php_admin_flag engine Off
        php_admin_flag engine On
    </Directory>
</IfModule>
1 Like