skip to Main Content
+971 55 881 1725 hmimthiaz @ imthi.com

Facebook Open Graph Meta WordPress Plugin

Today I wanted put Facebook Open Graph Protocol meta tags on my blog. I searched for a long time and I was not able to get a simple and working plugin for WordPress. So I decided to write my own. If you want use this plugin please make sure you replace the tag [REPLACE] with appropriate values.

This plugin is already activate on my blog. If anyone shares or likes a link from my blog it will have all full details on facebook 😉

Download Facebook Open Graph Meta WordPress Plugin

Moved to new hosting Media Temple

For a very long time I was a happy customer with hostgator. Recently I faced couple of downtime with the reseller hosting package. For some reason due to another account the apache kept dieing without notice. So I decided to move my blog to cloud based hosting. Couple of months back my colleague Shuja had suggested me about Media Temple. Now I thought it was the right time to move.

I subscribed for Grid Service hosting which is for 20$ monthly. After moving my blog I did a load test and it seems to be pretty stable.

The good thing about this hosting is for 20$ you get fixed 1000 hours of GPU. And based on load and usage it gets consumed. Suppose if you see a sudden spike in the traffic your website will be scaled automatically. If you cross 1000 hours it charges 10 cents per hour. If anyone is looking for scaling your website I suggested you do a test drive with media temple.

😉

Apache Log Format for Amazon EC2 with Elastic Load Balancer

The journey through the Amazon Cloud (AWS) is quite amazing. Recently I had to use two EC2 instance with Elastic Load balancer. Once the website was served with load balancer only the load balancer IP was logged as remote IP.

After Googling for few hour and with trial and error method I got the correct Apache log format so that the real remote IP is logged.

I created a custom log format with a name “combined_new” and used it in all the virtual host configured in Apache. But you can use the format however you want.

Before you make any changes to httpd.conf please go through Apache log module.

I hope this small tip helps 😉

Note: Always backup your original httpd.conf before you make any changes.

Download & Process Amazon Cloudfront Logs with Awstats

These days we use Amazon Cloudfront for content delivery. Amazon has made it very easy to deliver files in a Amazon Simple Storage Service (S3) bucket using Amazon Cloudfront distribution. If you are using Cloudfront as Content Delivery Network (CDN) your next task will be monitoring the usage. For this Amazon Cloudfront has a provision to store access logs to a S3 bucket. My hurdle was to process the log files stored by Cloudfront. For sites hosted with apache I use Awstats for reading the logs. So my vote was for awstats. Please follow the steps one by one 😉

1. Need to download the log files stored in the S3 bucket. For this I had to use the a python script done by wpstorm.net but I had to make some modification so that it worked for me. Please follow the blog post if you need any help setting up the required libraries.

get-aws-logs.py

Note: The above script will download the s3 logs to specified folder. Please make sure you put your Amazon access keys.

2. Now we have bash script which will uses the above python script to download the log files and combine all of them into a single log file and then it will be analyzed by awstats.

Warning: Please read through the script files and make necessary changes needed.
Note: You should have awstats installed on your system. The bellow script uses awstats.
Note: You can download the script files at the end of this blog post where awstats configuration with custom setup for cloudfront log format is also provided.

get-aws-logs.sh

I would suggest you to test run the above scripts on a staging / testing environment before moving to a production. Again please change the scripts with your domain details and Amazon access keys.

Download the scripts to download and process Amazon Cloudfront Logs with Awstats.

Have a nice journey exploring the cloud 😉

Back To Top