When we own a website, we may want to analyze on how many people visits our website. cPanel has several in-built statistical analysis programs and one of the most important ones is Awstats. Awstats produces visual statistics about visitors of your site.
Awstats gives details about the count of people visiting your website, and other information like:
> Monthly history
> Countries visiting your website (Top 25)
> Visits duration
> Operating Systems that accesses your website (Top 10)
> Browsers (Top 10) etc.,
Awstats updates the site stats information every 24 hours. The very first time you enable a log statistics program, normally it will take 24 – 48 hours for the reports to get appeared in cpanel.
To enable awstats for your website, you can use the steps mentioned below.
- Login to your cPanel.
- Click on Awstats option under the ‘Logs’ section.
- Click on the magnifying glass icon under the ‘View’ column to see the website stats for your website.
Sometimes, there are chances that your awstats program may not update the stats with the recent information. In such cases, you will see that the ‘Last Update’ and the ‘Last visit’ field in the awstats page are older than the current date.
To get the stats updated, you can manually enable the button ‘Update Now’ under the Awstats page in cpanel. Through the ‘Update Now’ option, you can instantly update the stats for your website and then notice that the report has been updated to reflect the most recent data.
Let us see how to enable the option ‘Update Now’ via various methods.
1) cPanel
Please follow the steps given below to enable ‘Update Now’ option via cpanel.
- Login into your cPanel.
- Open File Manager under ‘Files’ section.
- Navigate to the path /home/cpaneluser/tmp/awstats/ (where ‘cpaneluser’ is the username of your cpanel account).
- Edit the .conf file (e.g. awstats.example.com.conf) by doing right-click on the particular file and selecting the ‘Edit’ option. Consider example.com as the website name here.
- Search for the entry: AllowToUpdateStatsFromBrowser, set the value to 1.
AllowToUpdateStatsFromBrowser=1
- Save the .conf file. When you refresh your statistics page. you will get ‘update now’ link at the top of the page.
2) WHM control panel
Please follow the steps given below to enable ‘Update Now’ option via WHM.
- Login to your server using the root password.
- Go to the location Home >> Server Configuration >> Tweak Settings.
You can see several options as in the image given below.
- Click on the option the “Stats and Logs” to get the options listed under it.
- Search for the option “Allows users to update AWstats from cPanel” on the page and select the “On” button on the right side of the page. Then save the settings.
- This setting allows us to specify whether the server will allow the individual cPanel users to update their Awstats software via their cpanel.
3) SSH Root Login
Please follow the steps given below to enable ‘Update Now’ option via ssh.
- Login to your server via ssh using the root password.
- Navigate to the location via command line.
#cd /home/cpaneluser/tmp/awstats/ //**where ‘cpaneluser’ is the username of your cpanel account**//
- Open your website’s awstats configuration file.
#vi awstats.example.com.conf //**where example.com is the website name here**//
- To enable the ‘Update Now’ option change the value of the entry from AllowToUpdateStatsFromBrowser=0 to AllowToUpdateStatsFromBrowser=1
AllowToUpdateStatsFromBrowser=1
- Save and exit.
- Finally, run the following script for the changes to take place.
/scripts/runweblogs cpaneluser
The Awstats of your site will be now updated.
If you require help, contact SupportPRO Server Admin