AWStats unique visitors not updating after installing Engintron

Tags: cPanelHowtosNginxTroubleshooting

Published on: November 15, 2016 by Varick Downie

AWStats unique visitors not updating after installing Engintron


Why Engintron?

We all know that cPanel is the leading hosting control panel worldwide. And definitely there is no need to introduce cPanel. But as they say everything comes with a price, cPanel uses the Apache web server to serve websites by default. Even though Apache is a sensation with low traffic servers, it does not gel well with heavy web traffic and also it feeds on CPU/RAM way too much.

Now you guys might be wondering how to find a permanent fix for your high traffic server. Are you? Some of you might even think that we should quit all Favourite cPanel and move to other control panels that support other web servers. Well think again and ask the experts!!!!! Yes here is what the experts have to say!!!! By deploying Nginx, another popular web server software as Apache front end. Nginx acts as a web traffic proxy, directly serving all static assets like CSS, JS, images etc by default, instead of Apache. In effect this results in significant drop of CPU/RAM resources consumed by Apache, which leaves your server with more available resources for other tasks.

How can I do this? There are several options to do this. But yes here we are talking about engintron. Installing engintron in cPanel server let you sets up Nginx inside your cPanel which directly serves all static content like CSS, JS, images etc. instead of your actual web server, thus lowering the load and RAM usage. In short if you have performance issue with your cPanel server engintron is a good solution. And the good news is that once you set up engintron is there no need for further maintenance, you are set to go just like that.

Issue with AWStats

Recently after installing engintron many clients came back to us. Their complaint was that their AWStats is not responding, unique visitors status on Awstats not updating etc. This made us curious and we decided to investigate this further. And like always sages found the fix. After our investigation we came to the conclusion that this is exactly not an issue. What if we say your AWStats is actually updating unique visitors!!!! Now you may me wondering why then AWStats unique visitors number is not increasing??? After all yours is a heavy traffic server.

Its time for some troubleshooting!!! Now lets check from the server back end that which all IP’s are visiting our site. The best place to see this is the domain log. You can go the the following location to view the domain log also known as domlogs. And check the domlog of the desired domain here.



Here you can find the result as following.


Now we can compare the domlog results with a server that have no engintron installed.


We found that our server IP is masking our visitors IP. Kindly note that due to security issues, the IP and the domain name in the actual issue are blurred in the above image.

The reason for the visitor IP masking by the server is due to the configuration of Nginx as apache front end. Nginx acts as a web traffic proxy and hence the requests will be originated from the Nginx server with the server IP and creates an internal loop instead of separate distinct connections. The net result of this is our server will be our new visitor by masking the original visiting IP.

What might be a solution for this? You should have a clear picture about the number of unique visitors to be in a confident position with regard to your sales activities and SEO ranking.  Basically awstats uses domlog information as the raw data for processing the stats. So if you wish to make the tweak, it should go with the raw data. Domlog results are produced in way that is determined by the Apache log format. Hence changing the log format will help us to get the desired results. We can change the Apache log format in httpd.conf file.



From the below picture you can find the Apache log format.



Remove %h in the log format. This is the IP address of the client (remote host) which made the request to the server. If a proxy server exists between the user and the server, this address will be the address of the proxy, rather than the originating machine.

In our case our own IP is the proxy. So after %h the proxy will be removed and AWStats will be fetching the visitors IP, thus the unique visitors in AWStats will be updated.

AWStats may take time to update and reflect the changes. In order to make make this process fast, AWStats statistics can also be updated from a browser, providing real-time statistics, by clicking the “Update now” link that appears.

Note: Make sure to save httpd.conf file after editing and then restart both Apache and Nginx. After this you will have to check Awstat configuration.


To enable this link, the configuration file parameter AllowToUpdateStatsFromBrowser must be set to 1 (The link is not enabled by default).

Get 24/7 expert server management

Category : Linux

Varick Downie

Varick Downie

You may also read:


Add new commentSIGN IN

Let's Connect


Your Cart

Cart is empty.

Send this to a friend