Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7460532
  • 博文数量: 1760
  • 博客积分: 18684
  • 博客等级: 上将
  • 技术积分: 16267
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-02 10:28
个人简介

啥也没写

文章分类

全部博文(1760)

文章存档

2024年(6)

2023年(44)

2022年(39)

2021年(46)

2020年(43)

2019年(27)

2018年(44)

2017年(50)

2016年(47)

2015年(15)

2014年(21)

2013年(43)

2012年(143)

2011年(228)

2010年(263)

2009年(384)

2008年(246)

2007年(30)

2006年(38)

2005年(2)

2004年(1)

分类: LINUX

2009-07-14 09:11:45

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
 
 
参考:
 
 
阅读(699) | 评论(0) | 转发(0) |
0

上一篇:Android LiveCD

下一篇:Slowloris HTTP DoS

给主人留下些什么吧!~~