Score:0

Home userdir is not working after enabled on Apache2

uz flag
gvd

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?

vidarlo avatar
ar flag
What does your logs say?
uz flag
gvd
See here access.log and error.log https://pastebin.com/cRSdpY0R
Frédéric Loyer avatar
bd flag
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 <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 </Directory> </IfModule> A flag engine On should be required.
uz flag
gvd
It works, thanks!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.