apache2 mod_fcgid + perl

Bonjour à tous !

J’ai configuré mon serveur apache2 avec le mod_fcgid pour lancer php avec un user bien défini.

Voici la conf de mon virtualhost :

<VirtualHost *:80>
ServerName test.com
ServerAlias test
ServerAdmin webmaster@test.com
DocumentRoot /var/www/vhosts/test/htdocs/

SuexecUserGroup test test
<Directory /var/www/vhosts/test/htdocs/>
Options +ExecCGI
AllowOverride All
AddHandler fcgid-script .php
FCGIWrapper /var/www/php-fcgi-scripts/test/php-fcgi-starter .php
Order allow,deny
Allow from all


ErrorLog /var/www/vhosts/test/logs/error.test.log
CustomLog /var/www/vhosts/test/logs/access.test.log combined
ServerSignature Off

Ainsi que mon script wrapper :

#!/bin/sh
PHPRC=/var/www/php-fcgi-scripts/test/
export PHPRC
export PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_CHILDREN=4
exec /usr/lib/cgi-bin/php

Jusque là, tout roule ! :038

A présent je voulais installer awstats.
Je ne savais pas mais la page pour afficher awstats dans un navigateur est en perl !

Donc il faudrait que je modifie la conf ci dessus pour que fcgid m’execute mon perl !

J’ai tenté de faire les modifs suivantes :

<VirtualHost *:80>
ServerName test.com
ServerAlias test
ServerAdmin webmaster@test.com
DocumentRoot /var/www/vhosts/test/htdocs/

SuexecUserGroup test test
<Directory /var/www/vhosts/test/htdocs/>
Options +ExecCGI
AllowOverride All
AddHandler fcgid-script .php .pl
FCGIWrapper /var/www/php-fcgi-scripts/test/php-fcgi-starter .php
FCGIWrapper /var/www/php-fcgi-scripts/test/perl-fcgi-starter .pl
Order allow,deny
Allow from all


ErrorLog /var/www/vhosts/test/logs/error.test.log
CustomLog /var/www/vhosts/test/logs/access.test.log combined
ServerSignature Off

et un nouveau wrapper :
#!/bin/sh
exec /usr/bin/perl

Voila.

Seulement ces modifs ne fonctionnent pas.
Quand j’essaye d’afficher la page j’ai une erreur 500
Dans les logs d’apache l’erreur suivante :

[Thu Mar 17 11:24:08 2011] [warn] [client 10.2.254.14] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Thu Mar 17 11:24:08 2011] [error] [client 10.2.254.14] Premature end of script headers: index.pl

Est ce que quelqu’un à une idée ?

Merci
Bonne journée ! :023