powerDNS with SQLite backend as a slave for BIND

(powerDNS)[https://www.powerdns.com] it’s a great alternative for large and complex BIND setup. Light footprint, and quick setup made that server as my obvious choice for slave server for primary BIND server. So let’s config begins:

Caddy rewrite and CodeIgniter

Caddy it’s a new kid in the block in category super light web servers. Personally – I love it. Same love I feel to CodeIgniter . To marge both of them, we need only basic rewrite rule to drop into caddyfile.

api.spidersoft.com.au {
        root /var/www/html/spidersoft.com.au
        gzip
        rewrite {
                to {path} {path}/ /index.php?/{uri}
        }
        fastcgi / /var/run/php-sock php
}

JSON objects in PHP

PHP is easy. You don’t have to know type of variable, before you use it. But sometimes it’s very problematic especially when we are dealing with JSON.