Edit the Apache config file in /etc/apache2/sites-available/default and add these lines:Īlias /awstatsclasses "/usr/share/awstats/lib/"Īlias /awstatsicons/ "/usr/share/awstats/icon/"Īlias /awstatscss "/usr/share/doc/awstats/examples/css" In order to access AWStats, we have to tell Apache where it is. If Apache isn't installed yet, run: sudo apt-get install apache2 Find it and change it: SkipHosts="REGEX" Installing & configuring ApacheĪWStats needs a web server to serve it's reports. ![]() These events originate from a private (10.x.x.x) IP range and are worthless for AWStats. So every time you access something in your bucket through the Management Console, it get's logged. Amazon not only logs what requests have been made to your S3 website, but also logs internal events. Find the LogFormat variable in the config file and change it to this: LogFormat="%other %extra1 %time1 %host %logname %other %extra2 %url %methodurl %code %other %bytesd %other %other %other %refererquot %uaquot %other" Luckily, Amazon provides a Server Access Log Format document detailing the anatomy of a log file. Now we need to "teach" AWStats how to parse the Amazon S3 log files. Where you save the log is not important as long as it's accessible by AWStats. LogFile specifies the location of the access log that AWStats should parse. Most of these items are self-explanatory. SiteDomain="HostAliases="localhost 127.0.0.1 savjee.be" Find them and modify them so they match your website's setup: Inside the config files, there are a few variables that need to be changed. Copy the sample configuration and name it to : cp /etc/awstats/nf /etc/awstats/.conf There is a template configuration located in /etc/awstats so that's a good starting point. Only one command is needed to install AWStats on Ubuntu Server: sudo apt-get install awstatsĪfter the necessary packages are installed, you need to configure AWStats. I choose a small VPS with Ubuntu Server on it. Installing & configuring AWStats on Ubuntu Server 12.10īecause AWStats can't be installed on S3, you're going to need a small server for it. Integration with Amazon S3 is not included by default, but it's not that hard to set up. ![]() ![]() It can take log files of a number of different applications and turns them into useful reports. I quickly found AWStats, a log analyzer similar to Webalizer but with more functionalities. S3 has the ability to log accessed files, but no way to analyze them in an efficient way. Additionally I used it to track how often Google indexed my website. This is a good way to track bandwidth usage. My previous hosting provider had Webalizer installed to analyze the Apache access logs. There's just one thing missing: access logs. I've been pretty happy with my new blog and the performance of S3. I also started using Amazon S3 to host my blog. A few weeks ago I switched from Wordpress to Jekyll.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |