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 求给定范围的全体素数p的(p-2)的连乘积
  • ¥15 VFP如何使用阿里TTS实现文字转语音?
  • ¥100 需要跳转番茄畅听app的adb命令
  • ¥50 寻找一位有逆向游戏盾sdk 应用程序经验的技术
  • ¥15 请问有用MZmine处理 “Waters SYNAPT G2-Si QTOF质谱仪在MSE模式下采集的非靶向数据” 的分析教程吗
  • ¥50 opencv4nodejs 如何安装
  • ¥15 adb push异常 adb: error: 1409-byte write failed: Invalid argument
  • ¥15 nginx反向代理获取ip,java获取真实ip
  • ¥15 eda:门禁系统设计
  • ¥50 如何使用js去调用vscode-js-debugger的方法去调试网页