![awstats restart awstats restart](https://support.managed.com/AvatarHandler.ashx?radfile=%5cCommon%5cHosting%20Support%5cHosting%20KB%20Images%5cGoogle%20Analytics.png)
Then restart httpd $ sudo systemctl restart httpd In each virtualhost I added new CustomLog and ErrorLog definitions, using the domain name of the virtualhost.
![awstats restart awstats restart](https://1118798822.rsc.cdn77.org/wp-content/uploads/2021/03/9-2-1024x640.png)
Now that we’ve got separate access logs, we need to tell our virtualhosts to use them. I renamed access_log to access_log.old, just so I don’t mistakenly review it’s data again. Then I dumped anything that didnt' match those rules into my main virtualhost’s log (including all the generic GET / entries.Īll my logs are sorted into per-virtualhost logs, and all lines from the original are accounted for. I ended up spending a few hours coming up with a bunch of rules to identify all queries for my non-main virtualhosts (yay static files). My biggest problem is a lot of log enteries didn’t actually indicate which virtualhost they were from. A lot of grep work, and I managed to split those out to individual access logs: /var/log/httpd/access_, for example. My first problem, is all were using /var/log/httpd/access_log for logging. I’ve got seven virtualhosts spread across four virtual machines. I’m mainly interested in seeing how many people actually read these articles, as well as what search terms referred them here.
![awstats restart awstats restart](https://anirudhsaxena.com/wp-content/uploads/2017/05/1-300x169.png)
I just wanted simple stats based on logs: It’s non-intrusive to visitors, doesn’t send their browsing habits to third parties (other than what they send themselves), and uses the apache log data I’ve already got for the entire year. This article isn’t supposed to help you decide. There are a few options: Use a service (Google Analytics, etc) or parse your logs.