this topic is related to the module that spethdl made for us: https://wiki.nethserver.org/doku.php?id=awstats
Unfortunately, only the virtualhosts created by the server-manager have been taken into consideration for the stats.
Beside these vhosts, other interesting URL could need stats e.g. modules nextcloud and dokuwiki that run as a subdomain, the forwarded URLS of the ReverseProxy, the main domain www.domain.tld.
Starting from this topic Nethserver-awstats needs testers I made some tests.
I understood that 2 things are necessary: a separate httpd-log file and a conf file for awstats.
The separate log file can be created more of less quite easy by adding:
#redirect access log for awstats statistics CustomLog /var/log/httpd/access.subdomain.domain.tld.log combined
<VirtualHost *:443> of the corresponding conf file of the subdomain into
This works fine for nextcloud, dokuwiki and mattermost as well as the forwarded URLs of ReverseProxy.
For www.domain.tld there is no <VirtualHost *:443> but adding the CustomLog parameters at the beginning of the conf file works.
Restart httpd after the modifications.
Of course this should be solved by using templates-custom but for tests, writing directly into the conf files is enough.
The conf files for awstats are into
/etc/awstats. Copying an existing file and modifying the name of the Logfile as well as the domain name and alias is enough.
To display the stats: starting from the server-manager => webstats (the “other” subdomains aren’t listed!) go to an existing virtualhost. Then replace the
other-subdomain.domain.tld and you have it.
This works eg. for dokuwiki, nextcloud and mattermost.
www.domain.tld as well as
forwarded-url.domain.tld make issue: stats are displayed, but these are not the stats from the separate log-files!!
I deleted the separate log-files and the values are still present.
The day and the time can not be updated and the stats look maybe like the general log-file!!
Where are these stats coming from? Where are the corresponding parameters for awstats?
Please let me know.