Chinaunix首页 | 论坛 | 博客
  • 博客访问: 534452
  • 博文数量: 184
  • 博客积分: 10010
  • 博客等级: 上将
  • 技术积分: 2490
  • 用 户 组: 普通用户
  • 注册时间: 2008-06-09 11:34
文章分类

全部博文(184)

文章存档

2011年(1)

2010年(2)

2009年(12)

2008年(169)

我的朋友

分类: LINUX

2008-11-23 15:50:20

1.安装httpd的开发包,httpd-devel

2.安装编译suPHP
#./configure –prefix=/usr –with-apxs2=/usr/sbin/apxs -

-sysconfdir=/etc/httpd/conf –with-apache-user=apache –with-setid-mode=owner

–with-apache-user=apache是设置apache的运行用户
–with-setid-mode=owner设置suPHP的模式,有force,paranoid,owner

3.修改httpd.conf
加入:LoadModule suphp_module modules/mod_suphp.so



suPHP_Engine on            #开启/关闭suPHP
suPHP_ConfigPath /etc/httpd/conf #配置文件目录
suPHP_AddHandler x-httpd-php
AddHandler x-httpd-php .php

4.添加suphp.conf
在/etc/httpd/conf里面添加suphp.conf文件

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

;Loglevel
loglevel=info

;User Apache is running as
webserver_user=apache

;Path all scripts have to be in
docroot=/

;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=true

;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=0007

; Minimum UID
min_uid=48

; Minimum GID
min_gid=48

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

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

阅读(984) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~