Current time: 12-05-2021, 08:36 PM Hello There, Guest! (LoginRegister)

Post Reply 
Enabling stats for subdomains
Author Message
MasterTH Offline

Posts: 570
Joined: Feb 2009
Reputation: 4
Post: #1
Enabling stats for subdomains
stats for subdomains are not created and are not included in the main domain, so i decided to create config-file for subdomains

copy /etc/awstats/awstats.$DOMAINNAME$.conf /ect/awstats/awstats.$SUBDOMAIN$.$DOMAINNAME$.conf

edit the log-file path to the /var/log/apache2/users/subdomain.domain.log

now you have to add the proxy-configuration for only on localhost running awstats-page

add this into the section of the subdomain in /etc/apache2/sites-enabled/ispcp.conf (make changes of subdomain & domain)

# httpd awstats support BEGIN.

ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all

ProxyPass /stats http://localhost/stats/subdomain.domain
ProxyPassReverse /stats http://localhost/stats/subdomain.domain

<Location /stats>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^(.+)\?config=([^\?\&]+)(.*) $1\?config=subdomain.domain&$3 [NC,L]
AuthType Basic
AuthName "Statistics for domain subdomain.domain"
AuthUserFile /var/www/virtual/domain/.htpasswd
AuthGroupFile /var/www/virtual/domain/.htgroup
Require group statistics

# httpd awstats support END.

then restart apache and wait till cron runs the statsjob. Now you can login with the same username & password as you use for stats-site of main-domain

Maybe we can add this into the templatefiles of subdomain to enable this directly in the creation progress

(This post was last modified: 07-06-2010 08:43 PM by MasterTH.)
07-06-2010 08:42 PM
Find all posts by this user Quote this message in a reply
Post Reply 

Forum Jump:

User(s) browsing this thread: 1 Guest(s)