Awstats for linux website is not updating

Question: Awstats showing error in the Linux Server while updating

Answer:

If a linux website throwing below error while updating awstats

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 /webspace/reseller/webadmin/domain.com/log/httpd/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):
combined

Solution:

Open the apache file from vi /etc/httpd/conf/httpd.conf or /etc/apache2/conf/httpd.conf

And enter the following line just above the HC panel virtual host setting (NameVirtualHost IPAddress:80 )


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

Restart the apache

If then problem persists then follow these steps

Stop Apache

Go to website location /webspace/reseller/webadmin/domain.com/log/httpd rename the access_log file.

Start the apache

This shall resolve the issue.

Add Feedback