H-Sphere Documentation Sysadmin Guide

 

Mod_Perl Installation

 

This guide describes the installation of mod_perl to H-Sphere box.

As Apache server is installed without mod_perl support during H-Sphere installation, the simplest way to include this extension is through building mod_perl as a DSO outside the Apache source tree via the new Apache 1.3 support tool apxs (APache eXtension).

WORKFLOW

  1. Download the latest mod_perl source and documentation from http://perl.apache.org. Complete documentation may be found at http://www.cpan.org/modules/by-module/DB_File. The Apache-mod_perl_guide installer is located at the same address.
  2. Fulfill the following build steps:
    % tar xzvf mod_perl-x.xx.tar.gz
    % cd mod_perl-x.xx
    % perl Makefile.PL \
    USE_APXS=1 \
    WITH_APXS=/path/to/bin/apxs \
    EVERYTHING=1 \
    [...]
    % make && make install


    This will build the DSO libperl.so outside the Apache source tree with the new Apache 1.3 support tool apxs and install it into the existing Apache hierarchy. For example, if you want to use mod_perl for the Control Panel Apache server, you need to set WITH_APXS=/hsphere/local/home/cpanel/apache/bin/apxs. Following the successfull installation the following should appear:
    a) /hsphere/local/home/cpanel/apache/libexec/libperl.so file;
    b) two additional directives in the /hsphere/local/home/cpanel/apache/etc/httpd.conf file
    • LoadModule perl_module libexec/libperl.so
    • AddModule mod_perl.c
  3. To make sure that mod_perl works correctly, you may test it by entering in the httpd.conf file a test line similar to the one below:
    Alias /perl/ /path_to_directory/
    PerlModule Apache::Registry
    <Location /perl>
    SetHandler perl-script
    PerlHandler Apache::Registry
    Options ExecCGI
    allow from all
    PerlSendHeader On
    </Location>

    and create the specified above perl script without mentioning the perl interpreter:
    /hsphere/shared/SiteStudio/public_html/perl/test.pl
    Next, check if it works correctly by trying out the link:
    http://some_url/perl/test.pl

NOTE: If you plan on intensely using the mod_perl feature, it should be properly documented. Download and install the documentation at http://www.cpan.org/modules/by-module/DB_File.





User comments
No comments for this page.
Add comment


Home   Products   Services   Partners   Support   News   Contact   Forum
© 2020 psoft.net
All rights reserved.