Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

Configure Apache for Duplicate Logging

Discussion in 'EasyApache' started by Rob Reisenwitz, Jan 12, 2017.

  1. Rob Reisenwitz

    Rob Reisenwitz Registered

    Joined:
    Jan 12, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sparks Nevada USA
    cPanel Access Level:
    Root Administrator
    I need to configure Apache to create a duplicate access and error log.

    I used to be able to do the following but this no longer works:

    To make a separate set of log files without messing with these
    /var/cpanel/templates/apache2/main.default
    /var/cpanel/templates/apache2/main.local
    /var/cpanel/templates/apache2/vhost.default
    /var/cpanel/templates/apache2/vhost.local
    /var/cpanel/templates/apache2/ssl_vhost.default
    /var/cpanel/templates/apache2/ssl_vhost.local

    STEP 1

    Create the file:
    pico /usr/local/apache/conf/userdata/extralogs.conf
    pico /usr/local/apache/conf/extralogs.conf

    STEP 2

    Add:
    ErrorLog /home/hmwhmw42/public_html/fillspot/errorhmw42.log
    CustomLog /home/hmwhmw42/public_html/fillspot/accesshmw42.log "%h %l %u %t \"%r\" %s %b %v \"%{Referer}i\" \"%{User-agent}i\"

    STEP 3

    Restart Apache.
    service httpd restart
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you verify if this system uses EasyApach 3, or EasyApache 4?

    Thank you.
     
  3. Rob Reisenwitz

    Rob Reisenwitz Registered

    Joined:
    Jan 12, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sparks Nevada USA
    cPanel Access Level:
    Root Administrator

    We are using EasyApache 4.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    There's a thread here with a somewhat-related topic:

    SOLVED - Global Log

    Let us know if this helps put you on the right path.

    Thank you.
     
Loading...

Share This Page