dqayok7935 2013-06-15 00:12
浏览 64
已采纳

使用suPHP重启Apache时出错:suPHP_UserGroup

I am trying use suphp with apache for use a user for each vhost, all vhost is one directory in /var/www/ for example /var/www/user1/ and directory of each vhost only can read write and execute own that is user of that vhost.

I'am using Debian, apache2, I disable mod_php and cgi, enable suphp (I install suphp with apt-get install libapache2_mod_suphp). Configuration file /etc/apache2/conf.d/suphp is this:

[global]
;Path to logfile
logfile=/var/log/suphp/suphp.log

;Loglevel
loglevel=info

;User Apache is running as
webserver_user=www-data

;Path all scripts have to be in
docroot=/var/www:/var/www/${HOME}/public

;Path to chroot() to before executing script
;chroot=/mychroot

; Security options
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false

;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=false

;Send minor error messages to browser
errors_to_browser=false

;PATH environment variable
env_path=/bin:/usr/bin

;Umask to set, specify in octal notation
umask=0077

; Minimum UID
min_uid=100

; Minimum GID
min_gid=100

[handlers]
;Handler for php-scripts
application/x-httpd-suphp="php:/usr/bin/php-cgi"

;Handler for CGI-scripts
x-suphp-cgi="execute:!self"

And in the vhost are trying use www-data user for if this found add new user and change own of files. File of vhost:

<VirtualHost *:80>
        <IfModule mod_suphp.c>
                suPHP_Engine on
                AddHandler application/x-httpd-suphp .php
                suPHP_AddHandler application/x-httpd-suphp
                suPHP_UserGroup www-data www-data
        </IfModule>
...

And the rest of vhost file is as in vhost without suphp found. When I try /etc/init.d/apache2 restart apache say this error:

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.
failed!

I try enable module cgi and is same. How fix this error? Thx.

  • 写回答

1条回答 默认 最新

  • duanla3319 2013-06-15 02:24
    关注

    Compile with mode paranoid in versión 0.7.1 works.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 交替优化波束形成和ris反射角使保密速率最大化
  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程