ユーザ用ツール

サイト用ツール


サイドバー

このページの翻訳:



最近の更新



Tag Cloud

01_linux:02_www:15_centos6_suphp

15 CentOS6 suPHP7.2

必要なパッケージインストー

# yum -y install autoconf libtool gcc-c++
# yum install httpd php php-mysql php-mbstring mod_ssl apr-devel httpd-devel

suPHP

# wget http://www.suphp.org/download/suphp-0.7.2.tar.gz
# tar zxvf suphp-0.7.2.tar.gz
# cd suphp-0.7.2
# autoreconf --force --install
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--with-apr=/usr/bin/apr-1-config \
--with-apxs=/usr/sbin/apxs \
--with-apache-user=apache \
--with-setid-mode=owner \
--with-logfile=/var/log/httpd/suphp_log \
--with-min-uid=100 \
--with-min-gid=100 

# make 
# make install

/etc/suphp.conf

[global]
;Path to logfile
;logfile=/var/log/suphp.log
logfile=/var/log/httpd/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=0077

; Minimum UID
min_uid=100

; Minimum GID
min_gid=100


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

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

/etc/httpd/conf.d/suphp.conf

LoadModule suphp_module modules/mod_suphp.so
suPHP_Engine on
AddHandler x-httpd-php .php
AddHandler x-httpd-php56 .php
AddHandler x-httpd-php71 .php

suPHP_ConfigPath /etc
suPHP_AddHandler x-httpd-php
suPHP_AddHandler x-httpd-php56
suPHP_AddHandler x-httpd-php71
01_linux/02_www/15_centos6_suphp.txt · 最終更新: 2019/01/15 17:29 by matsui