Finally, mark the file as executable so the system can run itĬhmod +x /etc/cron.hourly/awstats_.Next, to update our stats automatically every hour via cron we do the following:.Next we’ll call the AWStats perl script to manually update our stats right now:.Next let’s restart Apache httpd so our changes take effect:.Note: The LogFile directive in the AWStats config must be the same as the httpd VirtualHost CustomLog directive for the site we actually want the stats from (). Note: Make sure each of the above lines is uncommented and correctly configured for your setup. LoadPlugin=”geoip_city_maxmind GEOIP_STANDARD /usr/share/GeoIP/GeoLiteCity.dat”.(Optional: using the MaxMind direct download method) LoadPlugin=”geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat”.Now let’s edit the .conf we created above:.See the PHP-FPM document for adding that to the configuration.ScriptAlias /awstats/ "/var/www//stats/cgi-bin/"ĪuthUserFile /var/AuthGroupFile /dev/null ScriptAlias /cgi-bin/ /var/combinedĮrrorLog logs/_error_logĪlias /classes "/var//icon "/var/www//stats/icon/" We'll be adding this subdomain to track the above domains stats: You should already have a domain configured that you’d like to track the stats of like this: Next, let’s alter the Apache httpd nf file and add an entry for our new subdomain:Īdd this information in /etc//nf.Make a new directory to hold the DocumentRoot for the stats subdomain:Ĭhange this line: #AddHandler cgi-script. Our DocumentRoot for is in /var/With this structure, anything associated with is all in one place but completely separate, regardless of how many subdomains we have. For security purposes the default Apache httpd documentRoot in Centos is /var/www/ Next we create the directories for the new subdomain.After successful install of the above software we will make a copy of the default AWStats config that we can use over and over:Ĭopy default conf so we always have a clean starting point if something goes wrong.Ĭp /etc/awstats/ /etc/awstats/Ĭp /etc/awstats/ /etc/awstats/.conf.Sudo mkdir /var/www/GeoIP cd /var/www/GeoIP If you choose to use only the MaxMind files directly, you can put them in /var/www/GeoIP as follows: Since there is no Centos package for the GeoLiteCity.dat you can get the single file from MaxMind as well as updated GeoIP.dat files here: The 64bit and src packages are provided so you can either install or rebuild your own. This is required to use the Maxmind free or paid geo databases. Yum -enablerepo=epel install awstats GeoIP-data perl-Geo-IPĪs of Centos 6.7 there is no longer a maintained perl-Geo-IP RPM package for Centos 6 from EPEL. Installing the EPEL software repository, AWStats and optional components for Geo tracking:Ĭlick the EPEL link for more verbose instructions or give this command:.In this document we will assume: you are root, you own and have administrative access to create the subdomain. Apache httpd configured properly with the domain you want to track with AWStats.Administrative or root access to your system.Administrative control over your domain and DNS entries.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |