Search:  
Gentoo Wiki

HOWTO_Install_PHP_with_SuExec

About

PHP working with suExec only if we use php as CGI.

Environment

First we need check our suExec environment:

Code: suExec Environment
 # /usr/sbin/suexec2 -V
 -D AP_DOC_ROOT="/services/www"
 -D AP_GID_MIN=100
 -D AP_HTTPD_USER="apache"
 -D AP_LOG_EXEC="/var/log/apache2/suexec_log"
 -D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
 -D AP_SUEXEC_UMASK=022
 -D AP_UID_MIN=1000
 -D AP_USERDIR_SUFFIX="public_html"

What that means:

Code: Code Title
<VirtualHost *:80>
SuexecUserGroup user hosting
ServerAdmin webmaster@example.com
ServerName example.com
DocumentRoot /var/www/example.com/htdocs/
ErrorLog /var/www/example.com/logs/error_log 
CustomLog /var/www/example.com/logs/access_log combined
ScriptAlias /cgi-bin/ /var/www/example.com/cgi-bin/
AddType application/x-httpd-php .php .php3
Action  application/x-httpd-php /cgi-bin/php
Options +ExecCGI
<Directory /var/www/example.com/htdocs/ >
 Options -Indexes FollowSymLinks MultiViews ExecCGI
 AllowOverride All
 Order allow,deny
 Allow from all
</Directory>
</VirtualHost>
Retrieved from "http://www.gentoo-wiki.info/HOWTO_Install_PHP_with_SuExec"

Last modified: Sat, 06 Sep 2008 09:54:00 +0000 Hits: 4,306