AWStats on Ubuntu 10.04 Server
Yesterday I finalized moving my websites to my new Linode. With all the base configuration done, it is time to start installing some monitoring and stats tools. AWStats in particular is one of my favorite tools for analyzing web traffic.
This guide assumes you are using Apache2, Ubuntu 10.04(though I would assume to process would be similar for Ubuntu 9.xx), and have root access to your box. Also I assume you have Apache properly setup with a working access.log file.
Installing AWStats
Ubuntu 10.04 has AWStats available in their repositories:
apt-get install awstats
The Ubuntu Repo. does not have the newest version of AWStats. The repo has 6.9 while the newest, stable, version is 6.95. The 6.9 install that Ubuntu provides should be enough for most people. If you wish, you can install the newest version manually and continue following afterwards.
Configuring AWStats
AWStats does offer some sort of automated configuration process. I have never used or tested this function. If you are not comfortable with manual configuration you may want to look up the automated configuration option.
I have multiple domains I wish to track. I needed to make a copy of the default awstats.conf file for each domain. I used the format awstats.mydomain.ext.conf for my configuration file name. In my case, mydomain.ext is kastang.com. You will have to create a copy of awstats.conf for each domain you want to monitor.
cp /etc/awstats/awstats.conf /etc/awstats/awstats.yourdomain.ext.conf
Open awstats.yourdomain.ext.conf, find and modify the following fields:
#Path to access.log for your domain LogFile="/var/log/apache2/access.log" #I recommend '1' for more detailed information LogFormat=1 SiteDomain="yourdomain.ext" HostAliases="localhost 127.0.0.1 yourdomain.ext"
Now we can generate the initial stats for AWStats based off of your existing access.log file. You need to run this command for every domain you have configured.
/usr/lib/cgi-bin/awstats.pl -config=yourdomain.ext -update
Check the output for any errors. If it successfully Finds/Parses your access.log file you should be good to continue. If you have any errors, double check your configuration file and make sure the path to the access.log is correct.
Configuring Apache
After configuring AWStats, we need to tell Apache where to point when the AWStats address is accessed.
Navigate to /etc/apache2/sites-available/. If you have no VirtualHosts setup, you will want to place the following code in 'default'. If you have VirtualHosts setup, add this code inside the VirtualHost tag for each domain you want to monitor.
Alias /awstatsclasses "/usr/share/awstats/lib/" Alias /awstats-icon/ "/usr/share/awstats/icon/" Alias /awstatscss "/usr/share/doc/awstats/examples/css" ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ ScriptAlias /awstats/ /usr/lib/cgi-bin/ Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Reload the Apache configuration:
/etc/init.d/apache2 reload
Check to make sure you do not have and errors or warnings. Depending how you originally setup your Apache config, the /cgi-bin/ ScriptAlias may already be implemented. In this case, just remove that line from the configuration file. (Don't forget to reload the configuration after all changes).
You should now be able to navigate to http://yourdomain.ext/awstats/awstats.pl and see the existing webstats from your access.log file.
Automating AWStats updates
AWStats will not automatically update by default. I cuggest using Cron to automate the process:
Add this to crontab and it will update stats once every three hours. You can adjust the timing to suit your needs. I have seen AWStats update on a weekly basis, daily basis, and even sometimes every couple minutes. You will need to add a separate crontab line for each domain AWStat is monitoring.
0 */3 * * * root /usr/lib/cgi-bin/awstats.pl -config=yourdomain.ext -update >/dev/null
Securing AWStats
If you are at this step, you should have a working AWStats. One issue is AWStats does not come secured by default. They do offer to enable Authentication in the configuration, but I think it is just easier to generate a simple .htaccess file. This method is a quick and dirty method for securing AWStats. If you require a more sophisticated method of securing AWStats, please consult the official documentation.
Navigate to /usr/lib/cgi-bin/ this is where awstats.pl is located.
Create a new .htpasswd file:
htpasswd -cb /path/to/.htpasswd username password
Create a new .htaccess file with the following inside:
AuthName "AWStats Authentication" AuthType Basic AuthUserFile /path/to/.htpasswd Require valid-user
Now if all goes well, when you refresh your browser you will be prompted to enter a username and password to access AWStats.
This should get you to a point where AWStats is usable and (reasonably) secure. From here you can add Plugins or further configure AWStats to fit your individual needs.
My Thoughts on SGU Season 1
NOTE: Season 1 and Season 2 spoilers in this post. Read at your own risk.
SGU 1.0
The first half of SGU was rough in my opinion. I had high expectations for the series even before it aired (which is always a mistake). After watching Air 1/2/3, it was obvious to see SGU would be darker then either SG1 or SGA was. I was fine with that. In fact, I was excited to see a sort of BSG themed Stargate series. After the premier though, things started to go down hill. My main issue was the overuse of communication stones. They took too much from issues surrounding the Destiny too early in the series. The communication stones should have existed only for emergencies (if at all). At times I felt as if I was watching a Lifetime drama during the extended Earth based communication stone scenes. The overuse of the communication stones almost seemed like the writers could not figure out how to write 45 minutes of material without filler space. Some episodes such as Time, were absolutely horrible. SG1 and SGA have both successfully mastered time travel, SGU has failed horribly in this regard. Near the end of Season 1.0, things started to fall into place. In particular Justice. Justice was a very well written episode that would later fuel events in Season 1.5. Most importantly the episode had an amazing cliffhanger. I think this episode alone is what kept quite a few viewers coming back after the mid season break.
Best Episode: Justice
Worst Episode: Time
SGU 1.5
I was happy to see SGU make a comeback after a rocky start. I believe it was a combination of the lesser use of the communication stones, the formal introduction to an alien enemy (and a damn cool looking one at that), space battles, and conflicts between Camile and Young that really had me hooked until the finale. One of my favorite episodes in the entire season was Human. Human showed the much needed background of Rush. It showed how much he sacrificed to get where he is today. It also shows an explanation as to why he is not bothered about never returning to earth again. I believe some episodes should have been extended to more then a single episode, and some events should have been better explained though (see below).
The finale is what really brought the entire season together for me. The revelation of the brainwashes Telford and the invasion of the Lucian Alliance was not expected at all. One important event that I believe will carry into next season is the portrayal of how truly horrible Young is as a military leader. With Telford physically on the ship now (and apparently surviving, see the Season 2 trailer below), I can imagine him taking over command of the Destiny. I would imagine some of those loyal to Young (Greer, Scott) would try to keep Young in power but would eventually be over powered by civilians and other military personnel. I am not quite sure if Telford taking control would be a good or a bad thing yet as we have never really met the non-brainwashed version of Telford until very recently. Yet again, Stargate pulls out a great cliffhanger (though this one I think is more predictable then the mid-series finale) for the finale.
Things I would like to see next season:
Longer Story Arcs!
The episode “Faith” should not have only consisted of only a single episode. The background of the episode was great: A solar system with a habitable planet that should not exist. If that wasn't enough, there was a man made structure on the planet that conclusively proved that some form of advanced alien live was on the planet before. I understand that the Destiny only had limited time before jumping back into FTL, but it wouldn’t have been impossible to show a few flashbacks of those who decided to stay on the planet. I hate to say it, but perhaps leaving a communication stone behind wouldn't have hurt either. It would have been interesting to see if the aliens ever came. If they did were they friendly or did they brutally murder everyone on the planet? I hope this episode is revisited sometime Season 2.
The Fate of Franklin
Franklin was probably my favorite sub plot so far in SGU. I was shocked to see Franklin vanished after he used the chair. My original reasoning was the ship helped him ascend, but later I realised that would be very unlikey because the ship is millions of years old and Ancients did not have the ability to ascend that many millions of years ago. My second thought was he was integrated into the ships systems. While this is still possible, I would have assumed he would have made some sort of an appearance especially during the invasion of the Lucian Alliance. I had a little hope when the Lucian Alliance member was disintegrated. I thought it was Franklin helping the crew protect the Destiny, but later it was because of the Gamma star and failing shields.
This is a topic that absolutely must be brought up next season. There is no way the writers can just write Franklin off by having him disappear.
Chloe
Chloe needs a clearly defined purpose to be considered a main character. In my opinion Chloe should have been background character from the beginning. During the entire duration of the first season, I can recall one episode where she actually served any type of real purpose. If the writers can not work her into the story in a meaningful way, she should be knocked off the show.
Season 2 Teaser Trailer (SPOILERS):
The Season 2 teaser trailer for SGU was released last week at Comic-Con. The trailer looks very promising, though it does ruin a significant amount regarding this seasons cliffhanger ending.
I have picked out the following bits of information from the trailer: (SPOILERS BELOW)
- All of the Earth crew leave the Destiny (presumably they are forced out at the beginning of the season) but somehow regain control of the ship again.
- Rush finds the real bridge. It appears he is not going to tell anyone about it though. Good to see Rush is staying in character.
- Greer, Telford, Chloe, and TJ survive the end of Season 1.
- More Camile Communication Stone drama.
- Chloe is infected with some Alien bug that is changing her DNA.
- Rush is working on a highly complicated puzzle (maybe linked to him finding the bridge).
- Rush says: "Ultimately I control this ship" - Maybe a reference to another Mutiny episode.
- Young may be forced out of leader of the Destiny.
Season 2 looks like it has a good amount of action associated with it. I am disappointed to see more communication stone drama though. I hope it will be kept at a minimum. With this trailer and other rumors floating around regarding alliances, space battles, finding out Destinys real mission, and SGA cast guest appearances. I think this season will make up for the shortcomings of last season plus some.
Stargate, Doctor Who, Torchwood, and Battlestar Galactica Watching Order
A few weeks ago a friend asked my opinion on the proper watching order of Stargate, Doctor Who, Torchwood, and Battlestar Galactica. I decided to clean up what I sent him and display it for anyone who may find this information handy. I have also included Netflix and Hulu links to material that is available for Instant streaming.
---Stargate---
Stargate consists of:
- Stargate (1994): Original movie
- Stargate SG-1 (SG1): 10 Seasons + 2 Movies
- Stargate Atlantis (SGA): 5 Seasons
- Stargate Universe (SGU): 1 Season – Continuing October 2010
Watching Order:
When dealing with a total of 16 seasons and 3 movies the correct viewing order can be confusing. I recommend using this website as a basis for your viewing. From my experience, this watching order is the easiest to follow without switching series every episode. Note as of July 2010, Stargate Universe has not been added to the list. It belongs in spot #15.
Quoted from Hixie's Natural Log:
- Stargate movie
- Stargate SG-1, episodes 1.1 to 8.2
- Stargate Atlantis, episodes 1.1 to 1.15
- Stargate SG-1, episodes 8.3 to 8.20
- Stargate Atlantis, episodes 1.16 to 2.1
- Stargate SG-1, episodes 9.1 to 10.2
- Stargate Atlantis, episodes 2.2 to 3.4
- Stargate SG-1, episodes 10.3 to 10.12
- Stargate Atlantis, episodes 3.5 to 3.19
- Stargate SG-1, episodes 10.13 to 10.20
- Stargate: The Ark of Truth
- Stargate Atlantis, episodes 3.20 to 5.1
- Stargate: Continuum
- Stargate Atlantis, episodes 5.2 onwards.
Stargate SG-1 is available for free on Hulu until at least January 31, 2011. Currently, the complete series of SGA is only available for streaming on Amazon ($1.99 an episode), or the physical DVD which is much cheaper then purchasing each individual episode for $1.99 a piece (or $20-30 a season streaming).
---Doctor Who and Torchwood---
Netflix + Doctor Who + Torchwood = Amazing.
Torchwood can be watched independently from Doctor Who. I personally chose to watch most of Doctor Who first without watching Torchwood in detail. I am half way through Series 2 of Torchwood and have not encountered anything more then minor references to the Doctor Who series.
Watching Order for those who want to watch TW and DW together:
- DW Series 1: [Netflix]
- DW Children in Need Mini Episode [YouTube]
- DW Series 2: [Netflix]
- TW S1: [Netflix]
- DW Series 3: [Netflix]
- DW Time Crash – Mini Episode [YouTube]
- TW S2: [Netflix]
- DW Series 4: [Netflix]
- DW Music of the Spheres Mini Episode [YouTube]
- DW The Next Doctor [Netflix]
- DW Planet of the Dead [Netflix]
- TW Children of Earth [Netflix]
- DW The Water of Mars* [Amazon
]
- DW The End of Time* [Amazon
]
- DW 2010: E1 - E13 [BBC One] (UK only)
* - Not available on Netflix Instant Streaming or any other known legal streaming source
---Battlestar Galactica---
Battlestar Galactica is much more straight forward then Stargate or Doctor Who/Torchwood combination.
- Mini-Series/Season 1**
- Season 2**
- The Resistance (Webisodes) [Syfy]
- Season 3**
- Razor**
- The Face of the Enemy(Webisodes) [Syfy]
- Season 4**
- The Plan**
**Amazon offers streaming episodes of BSG for $1.99 per episode ($9.99 - $12.99 per movie). In many cases it is cheaper to buy the actual DVD new (or used) from Amazon. I would personally recommend picking up the Complete Series of BSG on Blu Ray or DVD
. The Complete Series has everything with the exception of "The Face of the Enemy" Webisodes.
Star Trek NX-01 1/1000 Scale Model
Today I built my 1/1000th scale Star Trek Enterprise NX-01 model kit that has been sitting on my desk for a few weeks. As I am new to model building, I was originally hesitant to purchase this kit after reading the not so great Amazon reviews. Eventually I decided to take the risk and purchase it because the NX-01 is one of my favorite ships from the Enterprise series. This model is the first Star Trek related model I have built, but certainly won't be the last. Other then a few hiccups, the few hours it took to assemble were enjoyable.
What I liked:
- The attention to detail is very impressive. Round2 really took their time to capture as much of the NX-01 detail as possible.
- Most of the pieces in the kit are numbered somewhere on the actual piece.
- The kit includes extras of the extremely small pieces. This was a live saver for myself personally. While assembling the kit, I dropped a piece that I could hardly see in my hand on the rug, there was no chance I would find that piece. Luckily that piece in particular had an extra included in the kit.
- The kit includes decals for both the Enterprise (NX-01) and Columbia (NX-02). The different deflector dish for the NX-02 is also included in the kit.
- The directions are on one large sheet of paper and for the most part very easy to understand. On the back side of the direction sheet is the decal instructions and placement diagrams. They are also clear and easy to understand, no need to guess where to place the decals. The direction sheet also includes an optional color chart for the minor details on the ship to add more details.
- For the most part, the pieces snap together without any issue.
What I didn't like:
- The kit does not detail how to paint the pattern for the saucer displayed on the box.
- While the ship is possible to build without glue, a few pieces almost require it. For example, the nacelles will not stay in place without the addition of glue.
Some Tips:
- A modeling knife and tweezers are an absolute must. Many of the pieces in this kit are less then 1/8th of an inch long. They are very difficult to handle especially if you have fat fingers like I do. Some holes on the saucer are not completely cut through, they need to be cut with the modeling knife before inserting the pieces.
- Modeling glue is also handy. Even though the kit says it is not required, some items such as the nacelles really need to be glued to keep them from falling off if the slightest movment to the model happens.
- The nacelles go on after the top and bottom saucer are snapped together. (This was the only confusion on the directions I experienced)
- Don't try to force any piece in, most should go in without issue. If you put a considerable amount of pressure on any piece, there is a good chance you will break the saucer. If you are having trouble fitting any pieces in, try trimming it with a modeling knife.
Additional Pictures:
Overall, for the price of the kit I am not disappointed with it one bit. Fully assembled, the model is around 9 inches long. I am still deciding if I want to paint the model, for that reason I have decided not put the decals on yet. If I do decide to paint it and it turns out nicely, I may buy the same kit again and put the Columbia deflector dish and decals on it.
My next project will most likely be the much larger 1/350th Star Trek USS Enterprise A (around 32" assembled) unless I can get my hands on a larger scale model of the NX-01. I estimate my next project to take a few months to complete as I plan to attempt to incorporate lighting in it if at all possible.
World of Warcraft Account Security
Recently there has been discussions in my Guild regarding World of Warcraft account security. I believe this is a perfect opportunity to give my opinion on measures that I believe must be taken to ensure increased general security of your computer along with your World of Warcraft account.
One thing I must make clear is there is no such thing as a completely secure networked computer. The suggestions listed below are simply extra precautions that must be taken to minimize the chance of your computer being compromised.
* - Applies to World of Warcraft only.
Get an Authenticator*
Having an Authenticator will virtually eliminate the chance of your account being compromised. The Blizzard Authenticator costs $6.50 from the Blizzard Store. If you are an iPhone/iTouch user, you can download the Mobile Authenticator for free. Having an Authenticator is no excuse not to do the remaining suggestions.
Web Browser
Use a secure browser. For the sake of speaking, that pretty much means anything besides Internet Explorer. My personal recommendation is Google Chrome or Firefox. For each, I highly recommend the WOT plugin.
WOT’s safe browsing tool warns you about risky sites that can’t be trusted: Online shops that cheat customers; download sites that deliver malware; sites that send spam; and those with inappropriate content for kids.
Web of Trust provides an additional layer of security when visiting websites. WOT is community managed, meaning if someone spots a phishing website, they can report it. The report is upload to WOT servers, if you try to access the website that has received a poor rating, WOT will block you from going to the website without your express permission. If you use Firefox, in addition to WOT, I also highly suggest NoScript. Currently, Google Chrome does not have a NoScript extension available.
Passwords
Your World of Warcraft password should be entirely different from any other service you use. Generally speaking, a password should be at least 8 characters long with upper/lower case letters, numbers, and symbols. Your World of Warcraft password (along with other sensitive passwords) should be changed at least once a month. It takes 2 minutes to do, don't be lazy. An example of a good password would be 'I3n&$VW49*'.
Anti-Virus, etc.
Windows users - Having AV software is not full proof. Consider it just another way to decrease the chances of having malicious software installed on your computer (for a long period of time). I personally recommend Avira or NOD32. Along with AV software, I also recommend Spybot and Malwarebytes (Free Edition is fine). Malwarebytes is specifically targeted to Malware, harmful software that is generally not picked up by AV software. AV software should be set to automatically update and run daily (Both NOD32 and Avira provide this option, as do many other AV's such as AVG and Avast). I would recommend running anti-malware software at minimum once a week.
For Mac(OSX)/Linux users, The options for security software is rather slim. I can recommend ClamXav(Mac) and Clamav(Linux) for virus scanning. I also recommend rkhunter for OSX/Linux systems. Generally speaking, there is not much more that can be done for OSX systems in terms of AV software. Sadly, Apple has spread false information on commercials by suggesting OSX is immune to viruses, until OSX suffers a mass attack, it is unlikely much further production of AV software will occur. As for Linux systems, there are other precautions that can be taken, but I will assume if you use Linux, you should know how to properly secure your system.
Note: Debian based distrobutions can run the follow command to download rkhunter and clamav:
sudo apt-get install clamav rkhunter #rkhunter -c to run #clamscan -r in '/' directory to run
Updates
Windows users - Automatic Updates should be turned on. Keep your system updated at all times. Microsoft is constantly releasing security patches to fix potential vulnerabilities in your system. If you are still using XP (or anything older) update to Windows 7 as soon as possible. When updates for your system become available, do not postpone restarting your computer to take effect, do it immediately when it asks.
OSX users - By Default, OSX will check for System Updates once a week (This setting can be changed in System Preferences -> Software Update). Install updates whenever they are available.
Linux users - If you are using a Debian based system, the following commands can be executed from a Terminal:
sudo apt-get update sudo apt-get upgrade
Other non-Debian based Distributions should consult the proper documentation.
Common Sense
Be smart when you use your computer.
- One precaution that should be taken is when reading email. Never click on links masked by anchor tags (HTML), especially World of Warcraft related emails. If you receive an email from Blizzard asking you to log in to your account, or a beta key, it is most likely a scam.
- When using your laptop on a public network, be very careful to use SSL connections while logging in/reading email or any other services. If you are on a public network, you should always assume that someone is watching and logging everything you do (this includes cleartext logins). For maximum security, I recommend always using hardwired connection wherever possible (this includes on a home network also).
- If at any point you find your computer acting strange, immediately stop what you are doing, update and run your protection software.
- If your World of Warcraft account is compromised, and virus scans show up nothing on your computer. Do not assume one is not there. Change the password for your email and WoW account on a different computer, then work on finding out what caused the security breach on your WoW computer.
Conclusion
Everything above may seem like a lot to take in at first, especially if you have little to no protection on your computer to begin with. The hour or two it will take to setup will be well worth it if your World of Warcraft account becomes compromised. Not only will following my suggestions increase the overall security of your system, it will also save you from possible embarrassment if your account becomes compromised. Once you get everything setup, it should not take more then a half hour of manual work per week to keep your system up to date and secure. I will repeat again, having this security software in place will not make your computer full proof against attack. The above software will only minimize the chances of your system becoming compromised.






