The infamous munin 404 error on cPanel

vi /etc/munin/munin-node.conf 

Locate (towards bottom)
host *

change to
host 0.0.0.0



This is what you see before….

HTTP error 404

The requested page was not found.

Possible reasons why you are seeing this page:

  • A bookmarked URL may have changed since you last visited.
  • The URL was entered incorrectly.
  • The URL was entered with inaccurate capitalization. (URLs are case sensitive.)
Please re-check the URL you are trying to reach. (Go Back)

How to get mod_geoip to work on cPanel (Country and City)

mod_geoip allows you to look up a user’s location from their IP Address. It comes in handy when you want to display flags, enable download server location and target specific users


First run following commands

cd /var/cpanel/easy/apache/custom_opt_mods
wget http://docs.cpanel.net/twiki/pub/EasyApache/EasyApacheCustomModules/custom_opt_mod-mod_geoip.tar.gz
 tar -xvf custom_opt_mod-mod_geoip.tar.gz



Run EasyApache via cPanel or via following command



/scripts/easyapache


mkdir /usr/share/GeoIP/

cd /usr/share/GeoIP/
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gunzip GeoIP.dat.gz
gunzip GeoLiteCity.dat.gz
rm -f *.gz

Thereafter in cPanel WHM go to 

Apache Configurations > Pre VirtualHost Include

<IfModule mod_geoip.c>
GeoIPEnable On
GeoIPScanProxyHeaders On
GeoIPDBFile /usr/share/GeoIP/GeoIP.dat MemoryCache
GeoIPDBFile /usr/share/GeoIP/GeoLiteCity.dat MemoryCache
</IfModule>

Finally run

service httpd restart

If everything works well, you’ll get apache to run mod_geoip. You can test it by adding this php code on test.php

  <?php

    /*

      Uses mod-geoip to query the

      MaxMind GeoLite City

      binary database and returns

      geographic information based

      on the client’s IP address


      */

    $country_code = apache_note(“GEOIP_COUNTRY_CODE”);

    $country_name = apache_note(“GEOIP_COUNTRY_NAME”);

    $city_name = apache_note(“GEOIP_CITY”);

    $region = apache_note(“GEOIP_REGION”);

    $metro_code = apache_note(“GEOIP_DMA_CODE”);

    $area_code = apache_note(“GEOIP_AREA_CODE”);

    $latitude = apache_note(“GEOIP_LATITUDE”);

    $longitude = apache_note(“GEOIP_LONGITUDE”);

    $postal_code = apache_note(“GEOIP_POSTAL_CODE”);



    echo ‘Country code: ‘.$country_code.'<br>’;

    echo ‘Country name: ‘.$country_name.'<br>’;

    echo ‘City name: ‘.$city_name.'<br>’;

    echo ‘Region: ‘.$region.'<br>’;

    echo ‘Metro code: ‘.$metro_code.'<br>’;

    echo ‘Area code: ‘.$area_code.'<br>’;

    echo ‘Latitude: ‘.$latitude.'<br>’;

    echo ‘Longitude: ‘.$longitude.'<br>’;

    echo ‘Postal code: ‘.$postal_code.'<br>’;

 


?>

Control Panel for Linux

Choosing a control panel for your server is like picking a lock at a locksmith. Your house would be as secured as the lock is. And that too is true for your server in terms of getting a control panel.

In this day and age of technology, you can get a dedicated VPS for as low as $5. We have been in the Linux administration business for little over 8 years now and can safely share some of our thoughts that might come in handy.


What is a control panel?

In a lame term, a linux control panel is a software running on your hardware. It should have a web server, a database server, file server, FTP server and a solid security.


What we use?

We have been using cPanel for a while now. They offer 14-days free trial which is sufficient to setup your server.

In order to set-up your server here is what you need.

  • Pick Cent OS
  • Install Cent OS
  • follow these commands
    • cd /home/
    • yum install perl
    • yum update
    • wget -N http://httpupdate.cpanel.net/latest
    • sh latest
That last command will take long time. About 45 minutes to up-to 2 hours

Thereafter visit http://your_ip:2086 or https://your_ip:2087

Play Atari Breakout game in Google Image Search

If we want to play breakout game what we do is download application in pc or look for some online flash game.
But today Google is celebrating 37th anniversary of  game called “Atari” breakout which let us play actual game when we make search for ‘Atari Breakout’ on Google Image Search 

You can play game by mouse or keyboard arrow key. It also lets you publish your score on Google + page.
URL http://goo.gl/o42HI

Screenshot:

Google’s Gmail service goes down for Indian users

Having trouble logging into Gmail now? Wondered why it is logging you out? You are not alone who face this issue today. 
According to Web reports, Gmail India is crashed. The message on the page says, “502. That’s an error. The server encountered a temporary error and could not complete your request. Please try again in 30 seconds. That’s all we know.”
The 502 Bad Gateway error means that two different servers involved in loading a web page are not able to communicate properly.
However rest of the service are working,i.e Google+,blogger,Google search,Google Drive, youtube etc.