How to change port of webinterface in lighttpd

I wanted to change the default port (80) that lighttpd is serving Pihole's webinterface on, and I found a lot answers in this forum that are outdated and not valid anymore.

So, how is it done nowadays?

my system
  • Raspberry Pi 3 with
  • Raspberry Pi os 12, "Bookworm" (aarch64)
  • 6.1.0-rpi6-rpi-v8
  • lighttpd from the repo (currently): lighttpd/1.4.69
  • Pihole installed by piping the install script straight to bash

Create a file /etc/lighttpd/conf-enabled/20-custom-port.conf with the following content:

# Set custom port below to whatever you want it to be
server.port := 1234

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.