suPHP w/ apache2 wont reload, why am I getting this error?

September 30, 2014 2.6k views
    DocumentRoot /var/www/html
    <IfModule mod_suphp.c>
        suPHP_UserGroup root root

are my settings ... why does it give this error:

root@X:~# service apache2 reload
 * Reloading web server apache2                                                                                                             *
 * The apache2 configtest failed. Not doing anything.
Output of config test was:
AH00526: Syntax error on line 6 of /etc/apache2/sites-enabled/000-default.conf:
Invalid command 'suPHP_UserGroup', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.

1 Answer

suPHP_UserGroup can only be used inside of a <Directory> or <Location> block. From the suPHP documentation:

suPHP_UserGroup (expects user- and groupname)

  • Only supported when compiled with setid-mode "force" or "paranoid" * Specify the user- and groupname to run PHP-scripts with. This setting can only be used within a <Directory> or <Location> context. Example: suPHP_UserGroup foouser bargroup
  • Yeah I saw that when attempting to Google... could you please explain by using more simple terms. I don't really understand how line 6 should be set out. Thank you. :)

  • Try replacing

        <IfModule mod_suphp.c>
            suPHP_UserGroup root root


        <IfModule mod_suphp.c>
            <Directory /var/www/html>
                suPHP_UserGroup root root

    and restarting Apache: sudo service apache2 restart. Does that work?

Have another answer? Share your knowledge.