Specific line in logs makes awstats fail to update
Here is the error message:
AWStats did not find any valid log lines that match your LogFormat parameter, in the 50th first non commented lines read of your log. Your log file /var/log/apache2/yourserver_access.log must have a bad format or LogFormat parameter setup does not match this format. Your AWStats LogFormat parameter is: 1 This means each line in your web server log file need to have "combined log format" like this: 111.22.33.44 - - [10/Jan/2001:02:14:14 +0200] "GET / HTTP/1.1" 200 1234 "http://www.fromserver.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" And this is an example of records AWStats found in your log file (the record number 50 in your log): 70.31.80.245 - - [03/May/2019:01:20:30 +0200] "-" 408 3294 "-" "-"
The logs format are fine, the failure is caused by this entry: 70.31.80.245 - - [03/May/2019:01:20:30 +0200] "-" 408 3294 "-" "-"
The logs show way more than 50 lines like that:
70.31.80.245 - - [03/May/2019:01:20:32 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:32 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:32 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:32 +0200] "-" 408 3279 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:32 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:32 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:32 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:32 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:33 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:35 +0200] "-" 408 3279 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:37 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:38 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:38 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:38 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:41 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:41 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:41 +0200] "-" 408 3279 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:41 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:42 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:42 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:43 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:46 +0200] "-" 408 3279 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:47 +0200] "-" 408 3279 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:50 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:50 +0200] "-" 408 3279 "-" "-"
The logs show way more than 50 lines like that:
70.31.80.245 - - [03/May/2019:01:20:32 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:32 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:32 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:32 +0200] "-" 408 3279 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:32 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:32 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:32 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:32 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:33 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:35 +0200] "-" 408 3279 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:37 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:38 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:38 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:38 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:41 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:41 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:41 +0200] "-" 408 3279 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:41 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:42 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:42 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:43 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:46 +0200] "-" 408 3279 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:47 +0200] "-" 408 3279 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:50 +0200] "-" 408 3294 "-" "-" 70.31.80.245 - - [03/May/2019:01:20:50 +0200] "-" 408 3279 "-" "-"
The first one "-" between date and status code has to have some meaningful information so that Awstats can create stats. Try replacing it with "GET / HTTP/1.1". Source: Link