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 · 1699 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 vollstock, 4 days ago
3 90 3 days ago
Installation & Hosting · by David, 7 years ago
3 3389 2 weeks ago
Installation & Hosting · by David Meissner, 3 weeks ago
3 245 2 weeks ago
Installation & Hosting · by David Meissner, 3 weeks ago
0 169 3 weeks ago
Installation & Hosting · by Anthony J Cervo, 4 weeks ago
3 231 3 weeks ago