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.

How to add apache modules?

Discussion in 'EasyApache' started by EthraZa, Aug 24, 2009.

  1. EthraZa

    EthraZa Member

    Joined:
    Aug 24, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hi!
    I need to know if possible, how to add the modules auth_memcookie, mod_macro and mod_security in cpanel's apache and the php-memcache module in php.
    I'm using CentOS 5.3 and the latest cpanel (11.24.5).

    Thanks!
     
    #1 EthraZa, Aug 24, 2009
    Last edited: Aug 24, 2009
  2. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
    I think you probably need to recompile Apache in order to enable these modules.
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    mod_security is natively supported by EasyApache. EasyApache does not natively support auth_memcookie, mod_macro nor memcache for PHP (though memcache for Apache is supported). However, you can add support for these modules by building EasyApache Custom Optional Modules. Documentation for that is available at: Cpanel::Easy Framework POD
     
  4. EthraZa

    EthraZa Member

    Joined:
    Aug 24, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Error

    Hello, first, thanks for the replies.

    I'm reading and trying all the day long to add this modules but till now, I was unable to get it done.

    They are given the same error, so I'll post only about mod_macro, that is more simple.
    In the path /var/cpanel/easy/apache/custom_opt_mods/Cpanel/Easy/Apache I created the files macro.pm and macro.pm.tar.gz, the last one is the 1.1.10 tar.gz file downloaded from the mod_macro site.

    macro.pm:
    PHP:
    package Cpanel::Easy::Apache::macro;

    # cpanel10 - Cpanel/Easy/Apache/macro.pm    by EthraZa
    #

    our $easyconfig = {
        
    'version'   => '$Rev: 1.1.10 $',
        
    'name'      => 'Mod Macro',
        
    'note'      => 'mod_macro v1.1.10 for Apache 2.x',
        
    'src_cd2'   => 'mod_macro-1.1.10/',
        
    'hastargz'  => 1,
        
    'url'       => 'http://cri.ensmp.fr/~coelho/mod_macro',
        
    'license_url' => 'http://cri.ensmp.fr/~coelho/mod_macro/#license',
        
    'step'      => {
            
    '0' => {
                
    'name' => 'APXSing mod_macro into apache',
                
    'command' => sub {
                    
    my ($self) = @_;
                    return 
    $self->run_system_cmd_returnable( [ $self->_get_main_apxs_bin(), qw(-cia mod_macro.c) ] );
                },
            },
        },
    };

    1;
    When I run the easyapache, it stops with this error:
    Code:
    -- Begin opt 'Mod Macro' --
    
        -- Begin step 'APXSing mod_macro into apache' --
    !! '/usr/local/apache/bin/apxs -cia mod_macro.c' failed with exit code '-1' (IE: command not found) !!
    !! Restoring original working apache !!
    
    !! Executing '/scripts/initsslhttpd' !!
    !! Restarting 'httpd' ... !!
    !! 'httpd' restart complete. !!
    !! Executing '/scripts/initfpsuexec' !!
    !! Executing '/scripts/initsslhttpd' !!
    Compiling report...
    I have based my macro.pm in the ModGeoIP.pm file, downloaded from the cpanel site.

    Someone have any clue why only in my .pm file it say that cannot find the command?

    Thanks!
     
    #4 EthraZa, Aug 25, 2009
    Last edited: Aug 26, 2009
  5. EthraZa

    EthraZa Member

    Joined:
    Aug 24, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Ok... I had figured out why my pm file don't compile!

    The problem was that I'm following this from manual:
    So if your module is Cpanel::Easy::Apache::Foo it'd go into /var/cpanel/easy/apache/custom_opt_mods/Cpanel/Easy/Apache/Foo.pm

    It CANNOT be inside Apache, the right path is just /var/cpanel/easy/apache/custom_opt_mods/Cpanel/Easy/Foo.pm
    And it need to be changed in the package too:
    from
    package Cpanel::Easy::Apache::Foo;
    to
    package Cpanel::Easy::Foo;

    So in my macro.pm file is just change that and voila!

    Done! Thx!
     
  6. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    You know instead of adding it for use for EasyApache, it might be easier to just simply download the source and apxs in the modules that you want directly which takes all of maybe 5 seconds to setup and install into Apache. :D
     
  7. EthraZa

    EthraZa Member

    Joined:
    Aug 24, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hi!
    Yeah, I know I can install manually the modules, but I think maybe I need to redo it manually on apache updates, and if it occurs in some months the probability that I forget or miss do something is too high. Mainly because of my multi-server (heartbeat) setup here!
    But now all the modules are compiling and installing by EA3.

    Thanks!
     
Loading...

Share This Page