Конфигурация Mod_Perl для нескольких доменов

sqlwb Запускает Studio управления SQL Server Microsof. Удобный, когда Вы не можете найти, это перечислило в меню "Пуск", но Вы знаете, что это установлено на том сервере.:)

1
задан 6 October 2012 в 12:41
2 ответа

Приведенная вами документация является лишь примером. Вы можете включить реестр mod_perl для запуска сценариев Perl с директивой или даже в любом месте. Если вы хотите, чтобы они использовались только в определенных доменах, поместите их в директивы , а не за пределами VirtualHost.

0
ответ дан 4 December 2019 в 09:45

After searching, digging, here are the steps in short and clear, per domain mod_perl installation and configuration.

install the mod_perl using cpan, from your shell:

%cpan
cpan> install mod_perl
cpan>exit

Login to your WHM, then:

*)- 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.

the test script test.cgi code is:

#!/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";

the cpanel in the httpd.conf says:

# To customize this VirtualHost use an include file at the following location
# Include "/usr/local/apache/conf/userdata/std/2/gamept/domain.com/*.conf"

Thanks all

0
ответ дан 4 December 2019 в 09:45

Теги

Похожие вопросы