Let’s take a closer look at defining AWSTATS in DirectAdmin. At Bobcares, with our Server Management Services, we can handle your DirectAdmin AWStats issues.
AWStats In DirectAdmin
AWStats is an open-source server-based website log analysis tool that is suited for analyzing information from Internet services like the web, streaming media, mail, and FTP servers with packages readily accessible for the majority of Linux distributions. It is not a per-domain setting, but rather a global on/off switch.
Today we will explore more about integrating AWStats into DirectAdmin.
Downloading And Installing AWStats In DirectAdmin
In order to download and install the tool to the DirectAdmin, we can run the following command:
cd /usr/local/directadmin/scripts ./awstats.sh
This command will download and install the AWStats setup. It then adds awstats=1 and webalizer=0 to the directadmin.conf. The webalizer=0 code will shut off the Webalizer. If we want both, we can then override it. Also, insert AWStats as static HTML pages into:
/home/user/domains/domain.com/awstats
And store the config and tally data in:
/home/user/domains/domain.com/awstats/.data
Benefits Of AWStats In DirectAdmin
Some of the benefits we can consider include:
- The integrated AWStats has a security advantage over many plugins. With this configuration, files are chowned to root and chmod to a minimal setting making things safe, secure, and private.
- Subdomains will have their AWStats page with this configuration. DirectAdmin will also parse the AWStats data files to retrieve the bandwidth for the subdomains, thus as long as the parsing continues, the bandwidth for each subdomain will appear in DA on the subdomains page.
- The benefit of storing the data in /home/user is that users can take it with them when they are relocating their accounts.
- While creating the link, the ../stats symbolic link on the domain stats page will point to ../awstats.
Rather than being termed a disadvantage, I believe the following points as a reminder to keep in mind when using AWStats in DirectAdmin.
- The way the configuration of log names in config files makes the rotation of Apache logs slightly different during the tally. Renaming all logs to .log prior to the tally will not occur. However, processing of logs will be in place.
- This has the consequence of not sending a HUP to the master httpd process right before the tally. Also, Truncating logs is preferable rather than erasing logs during the cycle for each user.
- Testers should keep a watch on the implications of truncating a live log without immediately restarting Apache. It will most likely be OK. Also, Apache will restart post-tally as usual.
How To Disable AWStats For Individual User Accounts?
With the new AWStats processing update, where saved data is now held by the user, this takes up more space. Because some users may not want this, the override allows us to disable AWStats processing for their account. Despite the directadmin.conf option, We can now change the:
/usr/local/directadmin/data/users/username/user.conf
And add:
awstats=0
To override the global setting:
CMD_USER_STATS
This will also fully disable CMD_AWSTATS
. Most importantly, the awstats_process.sh will run for this User account.
[Searching for a solution to another question? Get in touch with us.]
Conclusion
In this article, we have explained the steps from our Support team for installing AWStats in DirectAdmin along with disabling it for per-User accounts.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
var google_conversion_label = "owonCMyG5nEQ0aD71QM";
0 Comments