Sunday, November 18, 2012

Awstats Direct URL installation for cPanel

 Awstats Direct URL installation for cPanel


For illustrative purposes we are assuming the following:
server hostname: server.example.com
awstats url : http://www.example.com/aw
cPanel primary domain: www.example.com
cPanel account name: example
subfolder where we are installing awstat: aw

Installation Steps:

 root@server [~]# mkdir -p /home/example/public_html/aw

 root@server [~]# cd /home/example/public_html/

 root@server [~]# wget http://www.awstats.org/files/awstats-7.1.tar.gz

(substitute wget link with latest version)

 root@server [~]# tar -zxf  awstats-7.1.tar.gz

 root@server [~]#  rsync -avp awstats-7.1/wwwroot/cgi-bin/     /home/example/public_html/aw/

 root@server [~]# mkdir -p /home/example/public_html/images

 root@server [~]# rsync -avp awstats-7.1/wwwroot/icon/  /home/example/public_html/images/

 root@server [~]# chown -R example.example /home/example/public_html/aw

 root@server [~]# chown -R example.example /home/example/public_html/images

 root@server [~]# chmod 755 /home/example/public_html/aw/*.pl

create .htaccess file with following entries
++++++++++++++++++++++++++++
AddHandler cgi-script .cgi .pl
Options +ExecCGI
+++++++++++++++++++++++++++
 root@server [~]# chmod 755 /home/example/public_html/aw/.htaccess

 root@server [~]# cp -p /home/example/tmp/awstats/awstats.example.com.conf
 /home/example/public_html/aw/

 root@server [~]# chown example.example  /home/example/public_html/aw/awstats.example.com.conf

 root@server [~]# chmod 755  /home/panorami/public_html/aw



Now the awstat output of the domain example.com should be accessible using
the following link

 http://www.example.com/aw/awstats.pl?config=example.com

ref:
http://www.thewebhostinghero.com/tutorials/access-awstats-outside-cpanel.html

2 comments: