Multiple dongles, YES! Multiple lighttpd webpages?

Thanks to obj’s great instructions in another thread, I’ve been able to bring up a second instance of dump1090-mutability using a second dongle on an OrangePi-PC running Debian-jessie-mini. It’s been running for 24 hours and so far so good. At the moment I have each one feeding into Virtual Radar Server as a separate receiver on a separate port, but would prefer to see the dump1090 pages served for each as a separate URL.

Has anyone tried doing something similar with the lighttp server, using it to serve the gmap.html file for multiple dongles on the same pi?

Linux and all these various configuration steps are new to me, but am certainly learning.
Thanks in advance for any insights or ideas.
yxespotter

This should be fairly easy:

  • run the second instance with a different json output directory
  • take a copy of /etc/lighttpd/sites-available/89-dump1090.conf and adjust the aliases so you have a second URL that uses the same static content in /usr/share, but points to the different json output directory for the second instance, enable the new copy with lighty-enable-mod

Thanks for this. I’ll work through it and report back.

While I wasn’t successful in making an adjusted/renamed second copy of 89-dump1090.conf work as hoped, exploring that option led me to a different solution that appears to give the results I was looking for.

After creating the second instance of dump1090-mutability and naming it as dump1090-2, (with its own JSON output) copied the contents of the /usr/share/dump1090-mutability directory into a new directory called /usr/share/dump1090-2. This gives access to a separate config.js file, in case a separate PageName or other option is needed.

With that done, edited the existing file at /etc/lighttpd/conf-enabled/89-dump1090.conf
and added a second url.redirect section and a second alias.url section. Saved the file and restarted the daemon.

The initial instance will be seen at IPADDRESS/Dump1090/gmap.html and
the second instance will be seen at IPADDRESS/Dump1090-2/gmap.html

These are the changes to the /etc/lighttpd/conf-enabled/89-dump1090.conf file



# Allows access to the static files that provide the dump1090 map view,
# and also to the dynamically-generated json parts that contain aircraft
# data and are periodically written by the dump1090 daemon.

url.redirect += (
 "^/dump1090/$" => "/dump1090/gmap.html",
 "^/dump1090$" => "/dump1090/gmap.html"
)

# ----------Add this section---------
url.redirect += (
 "^/dump1090-2/$" => "/dump1090-2/gmap.html",
 "^/dump1090-2$" => "/dump1090-2/gmap.html"
)
# ----------------------------------

alias.url += (
 "/dump1090/data/" => "/run/dump1090-mutability/",
 "/dump1090/" => "/usr/share/dump1090-mutability/html/"
)

# ----------Add this section---------
alias.url += (
 "/dump1090-2/data/" => "/run/dump1090-2/",
 "/dump1090-2/" => "/usr/share/dump1090-2/html/"
)
# ----------------------------------

# The stat cache must be disabled, as receiver.json changes
# rapidly and lighttpd's stat cache often ends up with the
# wrong content length.
server.stat-cache-engine    = "disable"



There may well be other/better/simpler ways of accomplishing this. For the moment. I’m glad to be able to see both web pages.

Thanks again