You can download the GeoLite Country database from GeoLite Free Downloadable Databases and you can grab the MaxMind GeoIP PHP API.
Once you have the GeoIP.dat file and the geoip.inc PHP file you’re good to go. E.g.:
require_once __DIR__ . '/geoip/geoip.inc';
$gi = geoip_open( __DIR__ . '/geoip/GeoIP.dat", GEOIP_STANDARD );
$country_code = geoip_country_code_by_addr( $gi, $host );
$country_name = geoip_country_name_by_addr( $gi, $host );
geoip_close( $gi );
Needed to use the Apache2 NameVirtualHost directive to enable virtual hosts on an IP address for one of my servers. Not entirely sure where the best place to put this configuration directive was I elected to put it in /etc/apache2/httpd.conf — which was empty before hand.
When I need a favicon.ico for my site I use the favicon.cc generator.