Skip to main content

Temporary log format change

Comments

4 comments

  • cPanelMichael
    Hello, You can make the change for a single VirtualHost using the instructions at: Modify Apache Virtual Hosts with Include Files - EasyApache 4 - cPanel Documentation Or, if you are using EasyApache 3: Advanced Apache Configuration - EasyApache - cPanel Documentation An error will occur if there's invalid syntax when running "/scripts/rebuildhttpdconf". Information on custom Log format configuration is available at: mod_log_config - Apache HTTP Server Version 2.4 Let us know if this helps. Thank you.
    0
  • Rakaris Bakaris
    Hello! Cpanel / Apache ignores custom log format. I have created a file on: /usr/local/apache/conf/userdata/std/2_4/domain/domain.com/domain.com.conf which contains the folowing lines:
    LogFormat "%V %a %l %u %{%d/%b/%Y %T}t.%{msec_frac}t %{%z}t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\"" combined CustomLog /usr/local/apache/domlogs/domain.com.log combined
    also this one
    LogFormat "%{%d/%b/%Y %T}t.%{msec_frac}t %{%z}t" combined CustomLog /usr/local/apache/domlogs/domain.com.log combined
    After each modification I have made "/scripts/rebuildhttpdconf" and "/scripts/restartsrv_httpd" without errors. After that the custom log is generated on specified location, but the log format is not changed. Why custom format is ignored?
    0
  • Rakaris Bakaris
    I have made the following changes to file CustomLog /usr/local/apache/domlogs/domain.com.log "%V %a %l %u %{%d/%b/%Y %T}t.%{msec_frac}t %{%z}t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\""
    And this worked for me. Thanks!
    0
  • cPanelMichael
    I'm happy to see it worked well. Thank you for updating us with the outcome.
    0

Please sign in to leave a comment.