LockedLog File Format incorrect???

Author
oakleeman
Senior Member
2010/07/17 20:47:00 (permalink)

Log File Format incorrect???

CentOS 5.5
HC 8 build 7

actual path files changed to reseller/webadmin/domain in post only

Log file setting for a site created via HC:
    ErrorLog /webspace/reseller/webadmin/domain/log/httpd/error_log
    CustomLog /webspace/reseller/webadmin/domain/log/httpd/access_log combined

Actual log file contents:
[root@oklinux httpd]# cat access_log
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
combined
[root@oklinux httpd]# cat error_log
[Sat Jul 17 22:14:20 2010] [error] [client IPADDRESS] File does not exist: /webspace/reseller/webadmin/domain/www/html/favicon.ico

From Awstats when attempting to update: No qualified records found in log (31 corrupted, 0 dropped) 
post edited by oakleeman - 2010/07/17 20:52:30
#1

6 Replies Related Threads

    agermose
    Senior Member
    Re:Log File Format incorrect??? 2010/07/18 03:07:37 (permalink)
    hi

    not so long ago, they changed the httpd.conf file completely incl. deleting any information about how the logformat should be and probably alot of other information you would normally like to have in httpd.conf

    re-add something like this to your conf file:

    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    LogFormat "%{Referer}i -> %U" referer
    LogFormat "%{User-agent}i" agent
    ErrorLog logs/error_log
    LogLevel warn

    #2
    oakleeman
    Senior Member
    Re:Log File Format incorrect??? 2010/07/18 11:50:09 (permalink)
    Ok, now I have stuff showing up in the access_log file but I still don't have anything showing up in Awstats.

    Every time I go to the /stats dir it tells me "Never updated (See 'Build/Update' on awstats_setup.html page" and when i do Update it gives a last updated time but the next time I go back to the dir it says that it needs to be updated again.

    When I look in the stats directory I see several files named:

    awstats072010.domain.com.tmp.22994
    awstats072010.domain.com.tmp.23620
    #3
    patrick
    Premium Member
    Re:Log File Format incorrect??? 2010/08/04 07:01:41 (permalink)

    Open vi /etc/httpd/conf/httpd.conf and make sure exactly same entry existed, if not then insert it.

    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    restart the apache

    If still stats not showing then open domain.com/log/httpd/access_log and remove all field 'combined '. Save and exit

    this shall fix the problem as it worked with me.

    #4
    patrick
    Premium Member
    Re:Log File Format incorrect??? 2010/08/05 03:07:31 (permalink)
    A small correction in my previous post

    Wrong> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined


    Correct > LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" combined  


    There is one additional double quote ' " ' just before combined word.
    #5
    HC Staff
    HC Staff
    Re:Log File Format incorrect??? 2010/08/05 04:16:13 (permalink)
    patrick

    A small correction in my previous post

    Wrong> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined


    Correct > LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" combined  


    There is one additional double quote ' " ' just before combined word.



    The log format which HC use  (LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined  ) is absolutely right there is no issue with ' " '. If you change it then I am afraid stats update will not work.

    @oakleeman you might be facing this problem due to permissions. Go to /domain.com/www/html directory and give chmod 707 stats. this shall resolve the issue.
    #6
    ALBERT
    Junior Member
    Re:Log File Format incorrect??? 2010/10/26 03:56:25 (permalink)
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
     
    You may try
    #7
    Jump to: