Tuesday, February 14, 2012

How To Install mod_geoip On Your WHM/cPanel Server

mod_geoip is an API module released by MaxMind for Apache (or interchangeably, LiteSpeed) to quickly and easily obtain your website visitors' geographical information. It offers high performance IP lookup especially when used together with PHP. See benchmark

While instructions to install mod_geoip on Linux with Apache are easily available on the Internet, not much is written on how to install the module on WHM/cPanel servers. This tutorial will walk you through installing mod_geoip on your WHM/cPanel step-by-step.

To be able to install mod_geoip on your WHM/cPanel server, you must have root access and is able to SSH to your Virtual Private Server (VPS) / Hyrbrid Server / Dedicated Server. Note that for Shared or Reseller hosting users, you may have to contact your web host to get the module installed for you (warning: don't expect it to be easy).

You will also need a Telnet / SSH client to log into your VPS. If you haven't got one, you can download the latest version of PuTTY for free.

Now that you have all the tools ready, let us dive straight into installing mod_geoip on your WHM/cPanel server.

Step 1: Log in to your VPS via SSH and create directory
Open up your SSH client (PuTTY) and log in to your VPS as root user. Then enter the following commands:

# mkdir /usr/share/GeoIP
# cd /usr/share/GeoIP
# cd GeoIP


Step 2: Download and install GeoIP database
To download and install the GeoIP database provided by MaxMind, enter the following commands:

# wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
# gzip -d GeoIP.dat.gz


Step 3: Download and install custom mod_geoip module for cPanel
Next we will install the custom mod_geoip cPanel module created by Sohail Riaz. Simply enter the following commands:

# wget http://twiki.cpanel.net/twiki/pub/EasyApache3/CustomMods/custom_opt_mod-mod_geoip.tar.gz
# tar -C /var/cpanel/easy/apache/custom_opt_mods -xzf custom_opt_mod-mod_geoip.tar.gz


Step 4: Rebuild Apache via EasyApache
Now that we have installed the GeoIP database and all the modules required to run mod_geoip with Apache and cPanel, we will need to rebuild Apache in WHM.

WHM -> Software -> EasyApache (Apache Update) -> Start customizing based on profile -> Check 'Mod GeoIP' option (on Short / Exhaustive Options List page) -> Save and Build

Step 5: Load and enable mod_geoip
After Apache has been rebuilt with mod_geoip, we will need to load and enable the module every time Apache runs. First, in WHM, go to:

WHM -> Service Configuration -> Apache Configuration -> Include Editor -> Pre Main Include -> Select the current Apache version

Second, enter the following codes into the textbox:

LoadModule geoip_module /usr/local/apache/modules/mod_geoip.so
GeoIPEnable On
GeoIPDBFile /usr/share/GeoIP/GeoIP.dat MemoryCache


And that's it! mod_geoip is now installed on your WHM/cPanel server in just 5 simple steps.

Tuesday, December 13, 2011

How To Fix Adobe Application Manager Update Error U41M1C212


If you encounter Error Code: U41M1C212 while updating Adobe products on your Windows computer, then I may just have the solution for you.


Apparently a network adapter named "Microsoft Virtual WiFi Miniport Adapter" is preventing Adobe Application Manager from reaching Adobe update servers. So as soon as you disable this network adapter in Control Panel -> Network and Internet -> Network and Sharing Center -> Change adapter settings, your Adobe updates will go through smoothly.


Now that's easy right?

But...

Is it really safe to "permanently" disable this network adapter?

A search on Google for what exactly "Microsoft Virtual WiFi Miniport Adapter" does returns rather inconclusive results at the time of this post, and an official reply from a Microsoft Engineer states:

Currently this feature is a development platform that exists only for application developers. Since this is a development platform any support would need to go through the application developer.
Here is a link to information regarding this platform on the Microsoft MSDN site:
http://msdn.microsoft.com/en-us/library/dd815243(VS.85).aspx

Which doesn't help much either.

So I went on ahead to perform a simple experiment on my own computer -- and that is to disable the network adapter for a few months to see if it affects anything along the way.

The result?

Nay... nothing. All my programs, Microsoft or otherwise, runs smooth as silk without any update or connection problems. But to be on the safe side you can always disable the network adapter when you are (manually) performing your Adobe update and then enable it again after you have completed.

Note: Adobe auto update feature including update detection may not work if you choose to use the disable-enable method

How To Get Your Own Facebook URL

Ever wonder how people get their nice looking Facebook URLs like http://www.facebook.com/dasongoh or http://www.facebook.com/BacklinksThatWork?

Do you know that you too can have your very own unique Facebook address in just 4 easy steps?

Here's how:

  • STEP #1: Point your web browser to http://www.facebook.com/username/
  • STEP #2: Enter the desired username for your Profile or Page.
  • STEP #3: Check if the chosen username is still available.
  • STEP #4: If it is still available, then confirm your entry.

NOTE: Usernames cannot be changed once they are set so choose carefully!

Viola! Your Profile or Page now has its own nice looking unique Facebook URL that is easy to remember and brand.

BEFORE:






AFTER:


Thursday, December 8, 2011

How To Use The Same ID For Both Your eBay And Gmail Accounts

"Your eBay user id cannot be the same as your email address."

If that rings a bell then you must have tried changing your eBay user id or your email address to match the other with the same id -- without success.

Let's take John Doe for example. His eBay user id is "johndoe" and he wishes to use his personal email address "johndoe@aol.com" from AOL for his eBay account. However due to the rising fraud cases of scammers registering similar looking email addresses i.e. userid@gmail.com, userid@yahoo.comuserid@hotmail.com and contacting bidders directly to "close the deal" outside of eBay, this is no longer allowed.

So John Doe is now left with only 2 choices: change his eBay user id to something else or use another email address with a different id.

But before John Doe is doomed to use a second choice id, he may just have a chance at it if he is using Gmail.

We all know that Gmail offers users loads of flexibility with their accounts. Virtually unlimited storage space, superb anti-spam capabilities and countless features aside, Gmail also offers users the ability to use their email ids in 2 different forms (official and unofficial).

Form #1 (Official): Periods (or ...)
Gmail typically ignores periods (.) in user ids. That means johndoe@gmail.com, john.doe@gmail.com and j.o.h.n.d.o.e@gmail.com are all treated as the same email address and will be translated to simply: johndoe@gmail.com.

Form #2 (Unofficial): Plus (or +)
Gmail will also ignore the plus sign (+) and any following characters before the "@" sign. That means that both johndoe+janedoe@gmail.com and johndoe+ebay@gmail.com will translate to simply: johndoe@gmail.com.

Using any of these different forms, John Doe can now use the "same" id for his eBay user account and email address. All he needs to do is to enter either john.doe@gmail.com or johndoe+ebay@gmail.com and eBay will happily accept the change, and John Doe will finally be able to receive his eBay emails in his favorite Gmail account: johndoe@gmail.com.