Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

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

apache

Started by Minjiao Lu 9 years ago · 0 replies · 1772 views
9 years ago

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

TXT
    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.


MARKDOWN
# 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
last edited 09/17/17 by Minjiao Lu

Suggested topics

Topic Participants Replies Views Activity
Installation & Hosting · by DrPen, 6 days ago
4 117 4 days ago
Installation & Hosting · by vollstock, 3 weeks ago
3 221 3 weeks ago
Installation & Hosting · by David, 7 years ago
3 3508 1 month ago
Installation & Hosting · by David Meissner, 1 month ago
3 345 1 month ago
Installation & Hosting · by David Meissner, 1 month ago
0 269 1 month ago