Konfiguracja suPHP

suPHP pozwala na uruchomienie skryptów PHP jako użytkownik danego katalogu, a nie użytkownik serwera apache (czyli www).

suphp.conf

[global]
logfile=/var/log/httpd/suphp/suphp.log

;Loglevel
loglevel=info

;User Apache is running as
webserver_user=www

;Path all scripts have to be in
docroot=/usr/local/www/*:/var/www/htdocs/virtuals/*

;Path to chroot() to before executing script
;chroot=/mychroot

; Security options
allow_file_group_writeable=true
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=80

; Minimum GID
min_gid=80

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

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

Wykonanie katalogu na logi suPHP

Dla serwera, którego partycje są wykonane wg przepisu należy wykonać polecenia:

zfs create tank/v/log/httpd/suphp

chown www:www /var/log/httpd/suphp/