0

i'm using ubuntu 15.04.

I have installed suphp (repo) with the guide from this url: Install suphp with apache on ubuntu

After I define the virtual host like this example:

<VirtualHost 64.131.72.23:80>
ServerName some-site.com
ServerAlias www.some-site.com
DocumentRoot /home/mike/public_html
<IfModule mod_suphp.c>
    suPHP_UserGroup mike mike
</IfModule>
</VirtualHost>

I restarted apache service and got the error:

Invalid command 'suPHP_UserGroup', perhaps misspelled or defined by a module not included in the server configuration


:/etc/apache2/sites-available# systemctl status apache2.service -l
apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2)
   Active: failed (Result: exit-code) since Wed 2016-01-20 00:36:26 CST; 41s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 18692 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 18718 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Jan 20 00:36:26 numi apache2[18718]: * The apache2 configtest failed.
Jan 20 00:36:26 numi apache2[18718]: Output of config test was:
Jan 20 00:36:26 numi apache2[18718]: AH00526: Syntax error on line 7 of /etc/apache2/sites-enabled/wpdev.co.il.c                           onf:
Jan 20 00:36:26 numi apache2[18718]: Invalid command 'suPHP_UserGroup', perhaps misspelled or defined by a modul                           e not included in the server configuration
Jan 20 00:36:26 numi apache2[18718]: Action 'configtest' failed.
Jan 20 00:36:26 numi apache2[18718]: The Apache error log may have more information.
Jan 20 00:36:26 numi systemd[1]: apache2.service: control process exited, code=exited status=1
Jan 20 00:36:26 numi systemd[1]: Failed to start LSB: Apache2 web server.
Jan 20 00:36:26 numi systemd[1]: Unit apache2.service entered failed state.
Jan 20 00:36:26 numi systemd[1]: apache2.service failed.

EDIT

According to the first answer I have wrapped my suPHP_UserGroup in <Directory> and still the same error.
I'm not a big expert so no compiling for now, just to understand why a package used by a lot of people doesn't work for me.

Any ideas ?

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
Yehuda
  • 157
  • 12

1 Answers1

0

http://www.suphp.org/DocumentationView.html?file=apache/CONFIG

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 or context. Example: suPHP_UserGroup foouser bargroup

./configure --prefix=/usr --sysconfdir=/etc --with-apr=/usr/bin/apr-1-config --with-apxs=/usr/sbin/apxs --with-apache-user=apache --with-setid-mode=paranoid --with-php=/usr/bin/php-cgi --with-logfile=/var/log/httpd/suphp_log --enable-SUPHP_USE_USERGROUP=yes

more reference : suPHP setting user/group to virtual host and using docroot

Community
  • 1
  • 1
Chetan Naik
  • 151
  • 13
  • tryed to compile, getting this errors: configure: WARNING: unrecognized options: --with-php, --enable-SUPHP_USE_USERGROUP configure: error: cannot find install-sh, install.sh, or shtool in config "."/config – Yehuda Jan 20 '16 at 06:49
  • This might help you http://askubuntu.com/questions/27677/cannot-find-install-sh-install-sh-or-shtool-in-ac-aux https://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:php:lsapi – Chetan Naik Jan 20 '16 at 06:55