mix

AWstats RMP

# /usr/share/awstats/tools/awstats_updateall.pl now

#  /usr/share/awstats/wwwroot/cgi-bin/awstats.pl

#  /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=mail.worldcm.com -update

5] Add crontab entry to update awstat for every 15 minute.

[root@server ~]# crontab -e

15 * * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=www.www.anup.co.in

6] Now we configure apache file to enable http based authentication.

Open the httpd.conf file and following lines at the end of file.

[root@server ~]# vi /etc/httpd/conf/httpd.conf

<Directory "/usr/local/awstats/cgi-bin">

  Order allow,deny

  Allow from all

</Directory>

# This is to force authentication when trying to access /awstats

<Location /awstats>

AuthType Basic

AuthName "AWStats Admin Access Required"

AuthUserFile /etc/httpd/conf.d/awstats.passwd

require valid-user

</Location>

7] Set username and password for awstat link.

[root@server ~]# htpasswd -c  /etc/httpd/conf.d/awstats.passwd admin

                         htpasswd   /etc/httpd/conf.d/awstats.passwd  testuser       # [ another user] 

8] Restart the httpd.

[root@server ~]# service httpd restart

That's it, access awstats url and check it.

http://localhost/awstats/awstats.pl?config=www.anup.co.in

                                                                                                                       http://anupdubbewar.blogspot.com/2013/09/install-and-configure-awstats-on-centos.html

Register a user for Apache Server

# htpasswd -c /etc/httpd/.htpasswd admin

New password:

Re-type new password:

Adding password for user admin

3. Edit configuration ( ex. /etc/httpd/conf/httpd.conf )

The following sample is a virtual Host (web server)

<VirtualHost *:80>

DocumentRoot "/home/world/html"

ServerName mywebsite

ErrorLog /home/world/logs/error_log

LogLevel warn

CustomLog /home/world/logs/access_log combined

<Directory "/home/world/html">

allow from all

Options +Indexes

</Directory>

# Directives to allow use of AWStats as a CGI

#

Alias /awstatsclasses "/home/world/html/awstats/wwwroot/classes/"

Alias /awstatscss "/home/world/html/awstats/wwwroot/css/"

Alias /awstatsicons "/home/world/html/awstats/wwwroot/icon/"

ScriptAlias /awstats/ "/home/world/html/awstats/wwwroot/cgi-bin/"

<Directory "/home/world/html/awstats/wwwroot">

AuthUserFile    /etc/httpd/conf/.htpasswd

AuthGroupFile   /dev/null

AuthName        "Please Enter Your Password"

AuthType        Basic

Require valid-user

</Directory>

</VirtualHost>

4. Restart Apache Server

# service httpd restart

or

# /etc/init.d/httpd restart

Webmin Module 

http://www.webmin.com/cgi-bin/search_third.cgi?modules=1

Download:  https://sourceforge.net/projects/awstats/

File location

#  /usr/share/awstats/tools/webmin/awstats-2.0.wbm

Upload webmin: awstats-2.0.wbm

filesystem path to AWStat:  /usr/share/awstats/wwwroot/cgi-bin/awstats.pl

--------