![]() |
[HowTo]My solution to password protect AWStats - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Contributions Area (/forum-40.html) +--- Forum: Howtos (/forum-41.html) +--- Thread: [HowTo]My solution to password protect AWStats (/thread-3356.html) |
[HowTo]My solution to password protect AWStats - Blondak - 05-23-2008 06:49 PM Requirements
Setup database because pam_mysql in current version does not support MD5 you must edit table admin Code: ALTER TABLE admin ADD apache_pass VARCHAR(41); Code: GRANT SELECT ON ispcp.admin TO XXX@"localhost" IDENTIFIED BY "YYY";FLUSH PRIVILEGES; Configure PAM create config file for pam, if have mod_auth_pam with path for setting service name create file /etc/pam.d/apache-awstats otherwise /etc/pam.d/apache2 Code: auth required pam_mysql.so user=XXX passwd=YYY host=localhost db=ispcp table=admin usercolumn=admin_name passwdcolumn=apache_pass crypt=mysql Code: chmod 640 /etc/pam.d/apache-awstats Update /etc/apache2/sites-available/01_awstats.conf update /etc/apache2/sites-available/01_awstats.conf Code: <Directory /usr/lib/cgi-bin> Update AWStats config next you must update awstats config files Code: AllowAccessFromWebToAuthenticatedUsersOnly=1 Done restart apache and passwords should work ![]() My tips for awstats i have create file /etc/awstats/support/awstats.common.conf with common configuration for all domain i update /etc/ispcp/awstats/awstats.ispcp_tpl.conf to following Code: Include "/etc/awstats/support/awstats.common.conf" I hope that I don't forgot something. With Regards Blonďák |