문서의 이전 판입니다!
apt-get install libapache2-mod-suphp suphp-common libapache2-mod-php5 php5-mysql
[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:${HOME}/public_html
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
umask=0022
; 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"
# a2dismod php5
# a2enmod suphp
<IfModule mod_suphp.c>
<FilesMatch "\.ph(p[345]?|tml)$">
SetHandler application/x-httpd-suphp
</FilesMatch>
suPHP_AddHandler application/x-httpd-suphp
<Directory />
suPHP_Engine on
</Directory>
# By default, disable suPHP for debian packaged web applications as files
# are owned by root and cannot be executed by suPHP because of min_uid.
<Directory /usr/share>
suPHP_Engine off
</Directory>
# # Use a specific php config file (a dir which contains a php.ini file)
# suPHP_ConfigPath /etc/php5/cgi/suphp/
suPHP_ConfigPath /etc/php5/cgi/suphp/
# # Tells mod_suphp NOT to handle requests with the type <mime-type>.
# suPHP_RemoveHandler <mime-type>
</IfModule>
# cd /etc/php5/cgi # mkdir suphp # cd suphp # cp ../php.ini
# vi /etc/php5/cgi/suphp/php.ini ... ; starlits@adminschool.net short_open_tag = On ...
<VirtualHost *:80>
ServerName adminschool.net
ServerAdmin webmaster@adminshcool.net
DocumentRoot /home/admin/html
<Directory /home/admin/html>
Require all granted
</Directory>
<IfModule mod_suphp.c>
suPHP_Engine on
</IfModule>
ErrorLog /var/log/apache2/adminschool.net-error.log
CustomLog /var/log/apache2/adminschool.net-access.log combined env=!dontlog
</VirtualHost>