EthraZa

Member
Aug 24, 2009
5
0
51
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!
 
Last edited:

thewebhosting

Well-Known Member
May 9, 2008
1,199
1
68
I think you probably need to recompile Apache in order to enable these modules.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
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!
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
 

EthraZa

Member
Aug 24, 2009
5
0
51
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!
 
Last edited:

EthraZa

Member
Aug 24, 2009
5
0
51
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!
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
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
 

EthraZa

Member
Aug 24, 2009
5
0
51
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!