I managed to fix it by downloading the lighttpd package from openwrt.org:
https://downloads.openwrt.org/releases/18.06.1/packages/mips_24kc/packages/lighttpd_1.4.48-3_mips_24kc.ipk