Parallels H-Sphere Documentation System Administrator Guide

 

Mod_Perl Installation

 

Last modified: 27 Dec 2007

 

WARNING: This documentation covers Parallels H-Sphere versions up to 3.1. For the latest up-to-date Parallels H-Sphere documentation, please proceed to the official Parallels site.

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 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=/hsphere/shared/apache/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.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/libperl.so file;
    b) two additional directives in the /hsphere/local/config/httpd/httpd.conf file (see config file customization for making changes into httpd.conf in H-Sphere 2.5 and up):

    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.



© Copyright 2017. Parallels Holdings. All rights reserved.