Migrating Apache2 Log Files
I got my second wind after successfully migrating the WordPress website and got to thinking about moving all the log files. I plan to keep all the stats I accumulated under the old domain and continue forward.
After several failed attempts at migrating Webalizer I gave up and decided to look for a more up to date log analyzer. I quickly found out my first choice, the “GoAccess” log analyzer, would not work for my purposes, so I started looking for something else and came across “AWStats”.
Moving On From Webalizer
Webalizer is like a trusted old friend. Webalizer has been running here for so long, I wondered how I’d ever get along without it. One look at AWStats and I was ready to switch. It makes Webalizer look like something from the Flintstones!
- Delete all existing files in the AWStats DataDir ‘/var/lib/awstats’
- Combine all my log files using the utility “logresolvemerge.pl” into one ‘masterlog’ file.
- Temporarily modify awstats.conf to update from the ‘masterlog’ file.
- Run the update.
Voila! The previous years logs were successfully imported into AWStats!
Next, I went back to the ‘awstats.conf’ file and set it to back to read the daily Apache2 access.log file
Log File / Domain Overlap
Using redirects, we can ensure all clients using outdated bookmarks will be taken to the same page on the new server.
After this, the only connections I should see should be direct connections to old domain URL’s from stale bookmarks.
I plan to let the Apache servers overlap in operation for the remainder of the month of December (2018 for that matter). On January 1, 2019 I will take the old Apache server offline for good. By that time all the search engines should have my entire site indexed, and I hope to have AWStats completely tweaked out by then.