Lighttpd_Suphp

[ Serveurs - Lighttpd - Phpmyadmin - Suphp ]

Liste des variables d'environnement disponibles pour suPHP

SUPHP_PHP_CONFIG
SUPHP_AUTH_USER
SUPHP_AUTH_PW
SUPHP_USER
SUPHP_GROUP
SUPHP_HANDLER

Exemple de configuration

# suPHP lighty config - by Mark Grenham                                                                                                                                         
# 01-Oct-2008
#

# Enable setenv - required to create environment for suphp
server.modules += ( "mod_setenv" )

# Enable cgi
server.modules += ( "mod_cgi" )

# Set up suphp environment to handle php files
$HTTP["url"] =~ "\.php$|/$" {
  setenv.add-environment = ( 
    "SUPHP_HANDLER" => "application/x-httpd-php"
  )
}

$HTTP["host"] =~ "^phpmyadmin\.example\.com$" {
  setenv.add-environment = (
    "SUPHP_HANDLER" => "application/x-httpd-php",
    "SUPHP_PHP_CONFIG" => "/etc/php5/cgi/phpmyadmin.ini"
  )
}

$HTTP["host"] =~ "^phpsysinfo\.example\.com$" {
  setenv.add-environment = (
    "SUPHP_HANDLER" => "application/x-httpd-php",
    "SUPHP_PHP_CONFIG" => "/etc/php5/cgi/phpsysinfo.ini"
  )
}

## Uncomment to enable suphp to handle other cgi scripts
#$HTTP["url"] =~ ".pl|.py|.cgi$" {
#  setenv.add-environment = (
#    "SUPHP_HANDLER" => "x-suphp-cgi"
#  )
#}

# Assign suphp to handle php files
cgi.assign = (
  ## Uncomment the following if you want suphp to handle other cgi scripts
  #".pl" => "/usr/lib/suphp/suphp",
  #".py" => "/usr/lib/suphp/suphp",
  #".cgi" => "/usr/lib/suphp/suphp",
  
  ".php" => "/usr/lib/suphp/suphp"
)

D'après cette configuration : http://www.markgrenham.com/articles/howto_lighttpd_and_suphp

Creative Commons License