How to make userdir working, ispconfig 3.1.2 with centos 7.3

Discussion in 'General' started by Konstantinos999, Oct 12, 2017.

  1. Konstantinos999

    Konstantinos999 New Member

    I want to ask a question about userdir. I have centos 7.3 and ispcong 3.1.2 . I have changed the userdir.conf file, i have enable it and i change the directories, /var/www/*/web .
    I have made a user and it is working, .
    When i make a second user it doesnt works, .
    Why? What i have done wrong
    I also try to do, but the link of the plugin doesnt working.
    Thank you for your help
  2. ISPConfig Developer ISPConfig Developer

    We don't know what "doesn't work" mean, as we don't know if there's really a blank test site right now for the 2nd user.
    Have a look at your httpd error.log , access.log it might say something if there's an issue.

    you can change the logging level in your /etc/httpd/ something something like httpd.conf - sry would need to quickboot centos for that.
    the plugin isn't available anymore since it likely doesn't work anymore anyways.

    However I'd guess it's a simple permission issue that your www-data is not able to read that directory
  3. Konstantinos999

    Konstantinos999 New Member

    doesnt work i mean that tell me that doesnt open the files/folders or html file i have. I have some files inside and also a html file. So it should open something or a blank page insteed of
    "This page isn’t working is currently unable to handle this request.
    HTTP ERROR 500"
    If i have permission issue, why from the first user it opens the site and from the second which i made the same settings doesnt open?
    At the attachment is the access_log, error_log file
    From where i must change permissions in your opinion?

    Attached Files:

  4. ISPConfig Developer ISPConfig Developer

    hmm the howto is both old and for debian, not centos.
    Just to be sure ( I started my centos 7.4 ispconfig VM for testing )

    # UserDir: The name of the directory that is appended onto a user's home
    # directory if a ~user request is received.
    # The path to the end user account 'public_html' directory must be
    # accessible to the webserver userid.  This usually means that ~userid
    # must have permissions of 711, ~userid/public_html must have permissions
    # of 755, and documents contained therein must be world-readable.
    # Otherwise, the client will only receive a "403 Forbidden" message.
    <IfModule mod_userdir.c>
        # UserDir is disabled by default since it can confirm the presence
        # of a username on the system (depending on home directory
        # permissions).
        UserDir disabled root
        # To enable requests to /~user/ to serve the user's public_html
        # directory, remove the "UserDir disabled" line above, and uncomment
        # the following line instead:
        UserDir /var/www/users/*/web
    # Control access to UserDir directories.  The following is an example
    # for a site where these directories are restricted to read-only.
    <Directory "/var/www/users/*/web">
        AllowOverride FileInfo AuthConfig Limit Indexes
        Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
        Require method GET POST OPTIONS
        <Files ~ '.php[s3-6]{0,1}$'>
    # apache 2.4
            Require all denied
    # apache 2.2
    #        Order allow,deny
    #        Deny from all
    #        Allow from none
    useradd test
    usermod -a -G apache test
    mkdir /var/www/users/test/web -p
    chown test:test /var/www/users/test -R
    systemctl restart httpd
    works pretty fine for me, also wih a 2nd user.
    note I disabled userdir for root and thought about not doing stuff like
    <Directory /var/www/*/web> since that would possibly affect regular websites
    Last edited: Oct 12, 2017
    till likes this.

Share This Page