The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mod_perl RPM installed, now what?

Discussion in 'General Discussion' started by Daemonia, Oct 7, 2004.

  1. Daemonia

    Daemonia Member

    Joined:
    Jan 22, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    I have a client who needs mod_perl, I have installed the RPM from the "Install an RPM" link from WHM (WHM 9.4.0 cPanel 9.4.1-S65 - RedHat 7.3 - WHM X v3.1.0) and it says installed.

    Is there anything else I need to do? httpd.conf?

    I'm really new to mod_perl and perl in general, I have suExec enabled, how do I go testing mod_perl out?

    Also, is there any info that the client needs to know if he/she needs to use mod_perl?

    Thank you very much.
     
  2. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    I never really used the rpm route for installation.
    Built it up as DSO.

    While building as DSO, the LoadModule and AddModule stuff is automatically added to httpd.conf if -cia switch is used.

    Then you need to have something like this:

    <IfModule mod_perl.c>
    Alias /perl/ /usr/local/apache/cgi-bin/
    PerlModule Apache::Registry
    PerlRequire /usr/local/apache/conf/startup.pl
    <Location /perl>
    SetHandler perl-script
    PerlHandler Apache::Registry
    Options ExecCGI
    PerlSendHeader On
    </Location>
    </IfModule>

    You would need a startup.pl file in the same directory as httpd.conf.
    It is here that you have to load the program specific libraries etc which your client would have to give the info to you wrt installation paths.

    Then within the VirtualHost you would have a similar
    <Location /perl>
    ....
    ....
    </Location>

    This is just a gist.
    mod_perl can be a tough beast to tame many a times.

    Best Of Luck
    Anup
     
  3. Daemonia

    Daemonia Member

    Joined:
    Jan 22, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Thanks, I'll try it out and post how it goes.

    Also, I read that mod_perl is not compatible with suExec, is there any way to make it work?

    Perhaps by excluding the virtual host from suExec? Is that possible?

    If no, do you think it is a security risk to disable suExec for mod_perl?

    Thank you very much.
     
  4. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    I am running more than 7 instances of mod_perl programs all under proxied mod_perl httpd.
    I have suExec enabled.
    Have faced no problems at all.

    Yes i had issues trying to run statically compiled mod_perl httpd (easyapache).
    Please be reminded that more than setting up the mod_perl httpd it is the mod_perl compatible programs which cause most of the problems...

    Also, for making a switch from mod_perl to mod_cgi would suggest the following:

    Install everything within cgi-bin (ie the scripts part).
    Alias /perl/ /home/user/public_html/cgibin/

    So with the stuff at same location:

    http://yourdomain.com/perl/script.cgi would work under mod_perl
    http://yourdomain.com/cgi-bin/script.cgi would work under mod_cgi ie normal cgi mode.

    In case there are problems observed at any stage wrt mod_per, the end user can have the same program working as normal cgi w/o the headaches of changing paths etc...

    BTW, your user is haviung some off the shelf stuff which he/she wants under mod_perl or is it custom coded?

    Can PM me in case need any additional help...

    Best Luck
    Anup
     
Loading...

Share This Page