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


  1. 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 \
    % make && make install

    This will build the DSO 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/ file;
    b) two additional directives in the /hsphere/local/home/cpanel/apache/etc/httpd.conf file
    • LoadModule perl_module libexec/
    • AddModule mod_perl.c
  2. 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

    and create the specified above perl script without mentioning the perl interpreter:
    Next, check if it works correctly by trying out the link:

Home   Products   Services   News
© Copyright. . PSOFT. All Rights Reserved. Terms | Site Map