From f1507d8f2e873afe3ac9fabeb322ce23a04855d3 Mon Sep 17 00:00:00 2001 From: Claudio Moretti Date: Fri, 3 Apr 2020 11:50:51 +0200 Subject: [PATCH 1/2] Load lighttpd alias module before using alias.url On some instances of lighttpd, like the one that comes with PiHole, the alias module is not loaded by default. This makes the configuration of PiAware's lighttpd not work (see e.g. https://discourse.pi-hole.net/t/pi-hole-and-piaware-lighttpd/9611). This way we ensure that the alias module is loaded even on non-default lighttpd configurations. --- debian/lighttpd/89-dump1090-fa.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debian/lighttpd/89-dump1090-fa.conf b/debian/lighttpd/89-dump1090-fa.conf index 287fd4f..09b5a27 100644 --- a/debian/lighttpd/89-dump1090-fa.conf +++ b/debian/lighttpd/89-dump1090-fa.conf @@ -2,6 +2,9 @@ # and also to the dynamically-generated json parts that contain aircraft # data and are periodically written by the dump1090 daemon. +# Enable alias module +server.modules += ( "mod_alias" ) + alias.url += ( "/dump1090-fa/data/" => "/run/dump1090-fa/", "/dump1090-fa/" => "/usr/share/dump1090-fa/html/" From 0ff1275bf9990c282c94b9b35858a3b412183260 Mon Sep 17 00:00:00 2001 From: Claudio Moretti Date: Fri, 3 Apr 2020 14:26:25 +0200 Subject: [PATCH 2/2] Comment-out the alias module load: disabled by default Standard lighttpd will refuse to start if modules are loaded more than once. Turn the module addition into a comment, explain why it's disabled by default and in which cases you should enable it. --- debian/lighttpd/89-dump1090-fa.conf | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/debian/lighttpd/89-dump1090-fa.conf b/debian/lighttpd/89-dump1090-fa.conf index 09b5a27..5ac6041 100644 --- a/debian/lighttpd/89-dump1090-fa.conf +++ b/debian/lighttpd/89-dump1090-fa.conf @@ -3,7 +3,22 @@ # data and are periodically written by the dump1090 daemon. # Enable alias module -server.modules += ( "mod_alias" ) +# +## This module is normally already enabled in lighttpd, so you should not +## need to uncommment this line. +## There are some cases (e.g. when installing this on a Raspberry Pi +## that runs PiHole) in which the module has been removed from the +## default configuration, and the dump1090-fa web interface no longer +## loads properly. +## If this is what you are experiencing, or if you see messages in your +## error log like: +## (server.c.1493) WARNING: unknown config-key: alias.url (ignored) +## then uncommenting this line and then restarting lighttpd could fix +## the issue. +## This is not enabled by default as standard lighttpd will not start if +## modules are loaded multiple times. +# +# server.modules += ( "mod_alias" ) alias.url += ( "/dump1090-fa/data/" => "/run/dump1090-fa/",