Awstats: access log of virtualhost is empty

okay, this is an older thread, but i setup awstats today and dont get it running. i do everything what is described, i get the webgui but there is written never updated. the panel is there, also everything what it normaly needs, time to renew is 5 minutes. any suggestions?

Did you set up a web site in a virtualhost :-?

Does this website generates traffic ?

hey @stephdl thanks for answering. i have the normal "website at the virtual host. and yep, it does. i did not see anything at the cron log, where i guess normaly must be an entry for update the data, right? if i go into the /var/log/httpd directory i see a file called: access and the name of the virtual host. but it is empty.

I cannot reproduce, my log file /var/log/httpd/access.DomainName.log is filled…I think the issue is here for you side

check /etc/httpd/conf.d/virtualhosts.conf if the directive is set in virtualhosts.conf

#redirect access log for awstats statistics
CustomLog /var/log/httpd/access.joomla.domain.com.log combined

does your virtualhost was created before to install awstats ?

In my case I created a website after the awstats installation

this is the option I set (quite default)

# config show awstats 
awstats=configuration
    DnsLookup=disabled
    GeoIP=#
    MaxNbOfBrowsersShown=10
    MaxNbOfDomain=10
    MaxNbOfDownloadsShown=10
    MaxNbOfHostsShown=10
    MaxNbOfKeyphrasesShown=10
    MaxNbOfKeywordsShown=10
    MaxNbOfLoginShown=10
    MaxNbOfOsShown=10
    MaxNbOfPageShown=10
    MaxNbOfRefererShown=10
    MaxNbOfRobotShown=10
    MaxNbOfScreenSizesShown=5
    MinHitBrowser=1
    MinHitDomain=1
    MinHitDownloads=1
    MinHitFile=1
    MinHitHost=1
    MinHitKeyphrase=1
    MinHitKeyword=1
    MinHitLogin=1
    MinHitOs=1
    MinHitRefer=1
    MinHitRobot=1
    MinHitScreenSize=1
    Minute=5
    Users=
    access=public
    skipPrivateIp=disabled
    status=enabled

everything is how you described it. the directive is set and also the config is like yours. i see in the cron job, that it try to make the update of the data. but it is not shown. if i do the command direct at a shell, i see for a short time that something happen, but it close quick and logged me out. i am not sure but i mean to see a error from something with mydir…

i dont get it. i checked it again with a new test virtual host. awstats forms an environment with a config for the virtual host. the file is awstats.test.xxx.de.vhost. in the file is a reference to LogFile = "/ var / log / httpd / access.test.xxx.de.log and the usual references sitename, domain name, etc. However, the references within awstats are first generated by the logfiles I did not find instructions in the various scripts, that is to say, I do not find a reference in the whole system where awstats should prepare the data if it is updated, he would have to have the reference somewhere in which the logfiles are defined and then the access.test. xxx.de.log to fill with the updated data.

what I found in the directory DirData = “/ var / lib / awstats”
a file.txt is generated. here are data available, but I can not understand where exactly they come from. the files are created in the rhythm of the awstats update. This is the half of the generated:

AWSTATS DATA FILE 7.7 (build 20180105)
#If you remove this file, 201809 wants to be lost / reset.
#Load config file used to create /etc/awstats/awstats.sbs.xxx.de.conf.

#Offset in bytes in this file for beginning of each section for
#direct I / O access. If you made changes somewhere in this file, you should
#so remove completely the MAP section (AWStats wants to rewrite it at next
#update).
BEGIN_MAP 30
POS_GENERAL 2069
POS_TIME 2755
POS_VISITOR 3601
POS_DAY 3853
POS_DOMAIN 4113
POS_LOGIN 4342
POS_ROBOT 4497
POS_WORMS 4729
POS_EMAILSENDER 4860
POS_EMAILRECEIVER 5003
POS_SESSION 5079
POS_SIDER 5252
POS_FILETYPES 5438
POS_DOWNLOADS 5567
POS_OS 5615
POS_BROWSER 5735
POS_SCREENSIZE 5925
POS_UNKNOWNREFERER 5999
POS_UNKNOWNREFERERBROWSER 6209
POS_ORIGIN 6476
POS_SEREFERRALS 6610
POS_PAGEREFS 6754
POS_SEARCHWORDS 6946
POS_KEYWORDS 7098
POS_MISC 2419
POS_ERRORS 7157
POS_CLUSTER 4198
POS_SIDER_403 7256
POS_SIDER_400 7428
POS_SIDER_404 7510
END_MAP

#LastLine = Date of last record processed - Last record line number in last log - Last record value
#FirstTime = Date of first visit for history file
#LastTime = Date of last visit for history file
#NewUpdate = Nb of parsed records - Nb of parsed records - Nb of parsed Nb of parsed - Nb of parsed dropped
#TotalVisits = Number of visits
#TotalUnique = Number of unique visitors
#MonthHostsKnown = Number of hosts known
#MonthHostsUnKnown = Number of hosts unknown
BEGIN_GENERAL 8
LastLine 20180921093427 1211 244236 8283786204319
FirstTime 20180916151959
Lasttime 20180921092317
Last update 20180921093501 1211 0 838 0 373
TotalVisits 18
TotalUnique 3
MonthHostsKnown 0
MonthHostsUnknown 3
END_GENERAL

I removed the blanks for formatting.

the key of the issue is to understand why your apache configuration does not write the log access to the specific log file of your virtualhost.

This is not an awstats issue, but an apache issue.

i have no clue, checked everything what i know… but did not find something wrong. do you have an idea where i can check something else? i dont recognize something is wrong at apache…

Unfortunately I did not find a solution. I use the original script of awstats, so everything works for me as it should. thank you for your help @stephdl

Hi,

Did you check the ACL of the file/folder?

Gabriel

1 Like

I suppose the log file is filled now ?

1 Like

yes, acl settings are okay there.

not the logfile what is generated from the virtual host, that was not working for me.
in the awstats.conf i change the entry for this host to the real log files. in my case i need the stats of access_log and ssl_access_log. this works good now with this configuration.

One Question, in the Webgui of your AWSTATS is an Entry having stats from inside lan and outside lan. dont get the function…

IIRC it is to not count stats from the lan, only outside of your network

1 Like

Not sure your are counting the accesses relevant to your web site but maybe something more general to your server

1 Like

yep, this is for what i use awstats, counting the accesses to the server. thats the reason i ask if maybe stats from the lan and outside the lan is change something in that case.

1 Like