From 7987598a724382307bce0ec8707854f26b486e99 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Mon, 11 Apr 2016 11:58:51 +0100 Subject: [PATCH] Listen on port 8080 and redirect to port 80 for backwards compatibility. --- debian/lighttpd/89-dump1090-fa.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/lighttpd/89-dump1090-fa.conf b/debian/lighttpd/89-dump1090-fa.conf index 75620f7..bfc84d6 100644 --- a/debian/lighttpd/89-dump1090-fa.conf +++ b/debian/lighttpd/89-dump1090-fa.conf @@ -11,3 +11,11 @@ alias.url += ( # frequently and lighttpd's stat cache often ends up with the # wrong content length. server.stat-cache-engine = "disable" + +# Listen on port 8080 and emit 301s pointing to port 80 +# to support the old convention of the map being on 8080 +$SERVER["socket"] == ":8080" { + $HTTP["host"] =~ "^(.*):8080" { + url.redirect = ("^/(.*)" => "http://%1/dump1090-fa/$1") + } +}