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!

Change location of apache error.log

Discussion in 'Security' started by MarkoTitel, Jul 27, 2018.

  1. MarkoTitel

    MarkoTitel Member

    Joined:
    Nov 29, 2015
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Novi Sad
    cPanel Access Level:
    Root Administrator
    Hi,

    I have an extra hard drive installed on one WHM server with intention to enable DUMP_IO.

    Is it possibile to change the location of error.log so I do not bload a system drive?
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @MarkoTitel,

    One way to do this is to setup a symbolic link in-case anything else still relies on the default path. EX:

    Code:
    touch /path/to/new/error_log
    mv /etc/apache2/logs/error_log /etc/apache2/logs/error_log.backup
    ln -s /path/to/new/error_log /etc/apache2/logs/error_log
    /scripts/restartsrv_httpd
    Then, browse to WHM >> Apache Configuration >> Include Editor and define the new path in the Pre Main Include section with an entry like this:

    Code:
    ErrorLog /path/to/new/error_log
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice