A replacement of Pi-hole instead using lighttpd over Caddy

Server environment
1. Debian9
2. Vultr VPS
3. Pi-hole v4.1

Install PHP7.3 

// apt install 
apt-get -y install curl php7.3-cli php7.3-fpm php7.3-mysql php7.3-curl php7.3-gd php7.3-intl php-pear php7.3-imap php7.3-pspell php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl php7.3-mbstring php-gettext

Install Caddy

curl https://getcaddy.com | bash -s personal
// Caddy binary file will store at

// Change permission
sudo chown root:root /usr/local/bin/caddy 
// permissions 
sudo chmod 755 /usr/local/bin/caddy

Config a site with PHP

// Edit Caddy file
nano /etc/caddy/CaddyFile

xx.com:81 {
    root /var/www/html/admin
    log /var/log/caddy/pihole.review.log 
    errors /var/log/caddy/errors.log
    basicauth / admin password
    tls /etc/letsencrypt/live/xx.com/fullchain.pem /etc/letsencrypt/live/xx.com/privkey.pem
    fastcgi / /run/php/php7.3-fpm.sock php {
        ext .php
        split .php
        index index.php

Photo by Kobu Agency on Unsplash