Depois de procurar, cavar, aqui estão os passos em curto e claro, por instalação e configuração do domínio mod_perl.
instale o mod_perl usando cpan, do seu shell:
%cpan
cpan> install mod_perl
cpan>exit
Faça login no seu WHM e, em seguida:
*)- WHM: Main >> Service Configuration >> Apache Configuration >> Include Editor
under Pre Main Include:
LoadModule perl_module modules/mod_perl.so
then click "Update"
*) - Login as root from telnet.
*) - % mkdir - p /usr/local/apache/conf/userdata/std/2/username/domain.com
*)- cd /usr/local/apache/conf/userdata/std/2/username/domain.com
*)- % pico custom.conf
*)- put this code in the file custom.conf:
Alias /apps/ /home/username/public_html/apps/
<Location /apps/>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
Order allow,deny
Allow from all
</Location>
*)- % /scripts/ensure_vhost_includes --all-users
*)- create the folder mkdir -p /home/username/public_html/apps/
*)- put a test script in the /home/username/public_html/apps/ folder
*)- call the test script: http://domain.com/apps/test.cgi
*)- the output should be:
mod_perl 2.0 rocks!
MOD_PERL: mod_perl/2.0.7
*)- replace username by the domain username, domain.com with the actual domain name. Also rename the apps folder to anything you want to run mod_perl scripts direct.
o código test.cgi do script de teste é:
#!/usr/bin/perl
print "Content-type: text/plain\n\n";
print "mod_perl 2.0 rocks!\n";
#my $q = $ENV{MOD_PERL} ? CGI->new(shift @_) : CGI->new();
print "MOD_PERL: " . $ENV{MOD_PERL},"\n";
o cpanel no httpd.conf diz:
# To customize this VirtualHost use an include file at the following location
# Include "/usr/local/apache/conf/userdata/std/2/gamept/domain.com/*.conf"
Obrigado a todos