Lighttpd with PiHole and additional sites

I have been facing some challenges creating a new website alongside my installation of pihole, with DietPi as the underlying operating system. I had been following some instructions specific to PiHole, but it seems these aren’t compatible with DietPi’s implementation of lighttpd.

To get around this I have created an additonal conf file at /etc/lighttpd/conf-enabled/external.conf with the necesary configuration to serve the additional site. Is there a more recommended way of doing this? Am I at risk of having this config file overwritten with an update to DietPi?


easiest way is to install PiHole via dietpi-software. This will ensure you are able to run additional software components, like other web services. If you install PiHole another way, like the PiHole guide, PiHole will hijack the web server as it believe being the only web application. This indeed will create challenges if you like to host something else. Therefore it’s highly recommended to used dietpi-software

Since the lighttpd.conf is not what Pi-hole support was expecting, I guess Pi-hole was already installed via dietpi-software, wasn’t it? Using /etc/lighttpd/conf-enabled/external.conf will work perfectly fine, or any other file name with .conf ending. To use the Lighttpd tools a little more as intended, use /etc/lighttpd/conf-available/99-.conf and then lighty-enable-mod . That is a bit more the way how vhost and config snippets in other webservers like Apache2 are handled, so that a config file does not need to be removed but can be enabled/disabled instead. Practically only a symlink from conf-available to conf-enabled is created.