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!

how to raw log in access_log

Discussion in 'General Discussion' started by jmginer, Jun 18, 2012.

  1. jmginer

    jmginer Well-Known Member

    Joined:
    Jul 26, 2006
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Benifato, Spain
    Hi,

    I want write in the /usr/local/apache/logs/access_log file the same as in the raw log,

    like:

    xx.xx.xx.xx - - [18/Jun/2012:18:04:42 +0200] "GET /images/file.png HTTP/1.1" 304 - "http://xxx.com" "Opera/9.80 (Windows NT 6.1; WOW64; U; en) Presto/2.10.229 Version/11.64"

    I tried to modify in httpd.conf

    from

    Code:
    <IfModule log_config_module>
        LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
        LogFormat "%h %l %u %t \"%r\" %>s %b" common
    
        CustomLog "logs/access_log" common
    
        <IfModule logio_module>
            LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    
        </IfModule>
    to

    Code:
    <IfModule log_config_module>
        LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
        LogFormat "%h %l %u %t \"%r\" %>s %b" common
    
        CustomLog "logs/access_log" [B]combined[/B]
    
        <IfModule logio_module>
            LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    
        </IfModule>
    But seems is not the good way.
    Any help please?

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #1 jmginer, Jun 18, 2012
    Last edited: Jun 18, 2012
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,608
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello,

    By not the good way, do you mean the changes aren't being saved when you rebuild Apache? If so, you can distill changes using the following

    Code:
    /usr/local/cpanel/bin/apache_conf_distiller --update
    This only pertains to sections outside the VirtualHost entries. Any VirtualHost changes (for domains on accounts) need to have includes in /usr/local/apache/conf/userdata created instead.

    Once you've distilled the changed to httpd.conf, then restart Apache:

    Code:
    /etc/init.d/httpd restart
    Please let us know whether this is the issue or something else.

    Thanks!
     
    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