Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

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

apache

Started by Minjiao Lu 9 years ago · 0 replies · 1405 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 jeremycherfas, 18 hours ago
1 42 14 hours ago
Installation & Hosting · by motorambler, 2 weeks ago
8 359 6 days ago
Installation & Hosting · by antoinep, 3 months ago
8 936 3 months ago
Installation & Hosting · by Jürgen Dietrich, 9 months ago
0 600 9 months ago
Installation & Hosting · by rappluk, 11 months ago
0 645 11 months ago