0

I'm trying to enable userdir in Apache2 but I only receive a blank page.

I used:

a2enmod userdir 
service apache2 restart

My conf file /etc/apache2/mods-enabled/userdir.conf

<IfModule mod_userdir.c>
    UserDir public_html
    UserDir disabled root

    <Directory /home/*/public_html>
        AllowOverride FileInfo AuthConfig Limit Indexes
        Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
        Require method GET POST OPTIONS
         
    </Directory>
</IfModule>

I only can list files and directories, php pages is blank.

I check in /var/www/html and works, but not in user home dir.

How can configure to enable userdir?

gvd
  • 109
  • 4
  • What does your logs say? – vidarlo Oct 10 '21 at 14:23
  • See here access.log and error.log https://pastebin.com/cRSdpY0R – gvd Oct 10 '21 at 15:23
  • 3
    In the /etc/apache2/mods-enabled/php7.3.conf, I have : # Running PHP scripts in user directories is disabled by default # # To re-enable PHP in user directories comment the following lines # (from to .) Do NOT set it to On as it # prevents .htaccess files from disabling it. php_admin_flag engine Off A flag engine On should be required. – Frédéric Loyer Oct 10 '21 at 15:37
  • It works, thanks! – gvd Oct 10 '21 at 19:14

0 Answers0