How to activate mod_log_forensic in Easyapache 4

speckados

Well-Known Member
Hi.

On manual only show how to install module mod_log_forensic, (For Easyapche 3)

I've installed via mod_log_forensic in EA4.

But after install I only see teh load module.

Code:
/etc/apache2/conf.modules.d/245_mod_log_forensic.conf
But after restart Apache I don't see any change.

I think need some steeps for configure.

Any help?

TRY this.

Code:
 cp /var/cpanel/templates/apache2_4/ssl_vhost.default /var/cpanel/userdata/seguimientoenerg/ssl_vhost.local
 cp /var/cpanel/templates/apache2_4/vhost.default /var/cpanel/userdata/seguimientoenerg/vhost.local

#Edit files
...
[% IF logstyle == 'combined' -%]
    [%- IF !enable_piped_logs || !supported.mod_log_config -%]
  CustomLog [% paths.dir_domlogs %]/[% wildcard_safe(vhost.log_servername) %] combined
    [%- END %]
[% ELSE %]
  TransferLog [% paths.dir_domlogs %]/[% wildcard_safe(vhost.log_servername) %]
[% END -%]
  CustomLog [% paths.dir_domlogs %]/[% wildcard_safe(vhost.log_servername) %]-forensic forensic
...
#Run
 /usr/local/cpanel/scripts/rebuildhttpdconf
Built /etc/apache2/conf/httpd.conf OK

But not work.
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello @speckados,

Installing the module in EasyApache 4 works as it's intended. Upon installing the the mod_log_forensic EA4 RPM, it's successfully loaded as an Apache module:

Code:
# rpm -qa|grep mod_log_forensic
ea-apache24-mod_log_forensic-2.4.33-5.5.1.cpanel.x86_64
# httpd -M|grep forensic
 log_forensic_module (shared)
There's no mechanism in place to automatically configure this Apache module after it's installed. This is something you need to do on your own after installing it based on the documentation at:

mod_log_forensic - Apache HTTP Server Version 2.4

For instance, I installed this module and then added the following entry to the Pre Main Include section in WHM Home » Service Configuration » Apache Configuration » Include Editor:

Code:
<IfModule log_forensic_module>
ForensicLog /etc/apache2/logs/forensic.log
</IfModule>
Upon doing this and accessing a website, /etc/apache2/logs/forensic.log included the forensic log output. Note this module is generally used for debugging purposes.

Thank you.