Article ID: 3189, created on Nov 30, 2007, last review on May 8, 2014

  • Applies to:
  • H-Sphere


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. Download the latest mod_perl source and documentation from Complete documentation may be found at 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=/hsphere/shared/apache/bin/apxs \
    % make && make install

    This will build the DSO outside the Apache source tree with the new Apache 1.3.x support tool apxs and install it into the existing Apache hierarchy. For example, if you want to use mod_perl for Web server, you need to set WITH_APXS=/hsphere/shared/apache/bin/apxs. Following the successfull installation the following should appear:
    a) /hsphere/shared/apache/libexec/ file;
    b) two additional directives in the /hsphere/local/config/httpd/httpd.conf file
    • LoadModule perl_module libexec/
    • 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

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

NOTE: If you plan on intensely using the mod_perl feature, it should be properly documented. Download and install the documentation at

f213b9fa8759d57bee5d547445806fe7 6311ae17c1ee52b36e68aaf4ad066387

Email subscription for changes to this article
Save as PDF