This Nginx Configuration sets up Pi-hole behind HTTPS using an Nginx reverse proxy for secure credential transmission when accessing the UI.
Using the NXDOMAIN blocking mode makes sure that Pi-hole is not serving empty HTML pages for every ad.
Since I use ufw
on my Raspberry Pi, the following rules are needed for the setup to work (SSH is optional):
sudo ufw status
Status: active