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 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号