Verifique se x-httpd-suphp na definição de vhost corresponde ao manipulador definido em /etc/httpd/conf.d/suphp.conf
. Por exemplo:
application/x-httpd-suphp="php:/usr/bin/php-cgi"
Estou tentando configurar o suPHP em uma caixa centos 6.5 com o módulo puppetlabs / apache.
Configuração do Apache
file { "/var/www/vhosts":
ensure => "directory",
owner => "root",
group => "root",
mode => 755,
}
class { '::apache':
require => File['/var/www/vhosts'],
}
include ::apache::mod::suphp
Exemplo de Vhosts
apache::vhost { $site:
port => '80',
serveraliases => [
$root,
"www.${site}",
"development.${site}",
"www.development.${site}",
],
options => ['Indexes', 'FollowSymlinks'],
suphp_engine => 'on',
suphp_addhandler => 'x-httpd-suphp',
suphp_configpath => '/etc/httpd/conf.d/suphp.conf',
directories => {
path => "${_root}/${webroot}",
'suphp' => {
user => $owner,
group => $group
},
},
override => 'ALL',
logroot => "${_root}/${logroot}",
docroot => "${_root}/${webroot}",
docroot_owner => $owner,
docroot_group => $group,
}
Ao aplicar estes mod_suphp
não puderam ser encontrados, então eu instalei e habilitei o rpm forge.
[rpmforge]
name = RHEL $releasever - RPMforge.net - dag
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/rpmforge
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
Eu o executo e ele é instalado, mas agora estou recebendo uma 500 internal server error
em páginas php.
Os logs do apache estão mostrando isso.
[Mon Dec 08 16:51:02 2014] [error] [client 192.168.50.1] SecurityException in Application.cpp:496: Handler not found in configuration
[Mon Dec 08 16:51:02 2014] [error] [client 192.168.50.1] Caused by KeyNotFoundException in Configuration.cpp:234: Handler "application/x-httpd-suphp" not found
[Mon Dec 08 16:51:02 2014] [error] [client 192.168.50.1] Premature end of script headers: index.php
Os logs do suphp estão vazios.
Tags php puppet apache-2.2 centos6 suphp