FlightAware Discussions

Upgraded to V5, webserver not running

I upgraded to V5 and evrything seems to be working, except I can’t connect to it locally.
When I login with SSH i dont see the lighttpd service running.
When I try to start it, it gives an exception.

Process: 1132 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=255/EXCEPTION)

nothing useful in /var/log/lighttpd/error.log

daemon.log says this:
Apr 9 16:11:46 piaware lighttpd[1127]: 2021-04-09 16:11:45: (configfile.c.1289) source: /etc/lighttpd/conf-enabled/89-skyaware.conf line: 41 pos: 1 parser failed somehow near here: (EOL)

Looking at line 41, i dont see anything wierd

$SERVER[“socket”] == “:8080” {
alias.url += (
“/data/” => “/run/dump1090-fa/”,
“/data-978/” => “/run/skyaware978/”,
“/” => “/usr/share/skyaware/html/”
)
} ------ THIS IS LINE 41

Any ideas how to fix it?

This is mine, works perfectly well. Compare your’s with it, may be you can find the error.
NOTE: This one is NOT an upgrade from previous version.
It is a freshly written Piaware SD card image ver 5.0

pi@piaware:~ $ sudo nano /etc/lighttpd/conf-enabled/89-skyaware.conf
 1 # Allows access to the static files that provide the dump1090 map view,
 2 # and also to the dynamically-generated json parts that contain aircraft
 3 # data and are periodically written by the dump1090 daemon.
 4
 5 # Enable alias module
 6 #
 7 ## This module is normally already enabled in lighttpd, so you should not
 8 ## need to uncommment this line.
 9 ## There are some cases (e.g. when installing this on a Raspberry Pi
10 ## that runs PiHole) in which the module has been removed from the
11 ## default configuration, and the dump1090-fa web interface no longer
12 ## loads properly.
13 ## If this is what you are experiencing, or if you see messages in your
14 ## error log like:
15 ## (server.c.1493) WARNING: unknown config-key: alias.url (ignored)
16 ## then uncommenting this line and then restarting lighttpd could fix
17 ## the issue.
18 ## This is not enabled by default as standard lighttpd will not start if
19 ## modules are loaded multiple times.
20 #
21 # server.modules += ( "mod_alias" )
22
23 alias.url += (
24   "/skyaware/data/" => "/run/dump1090-fa/",
25   "/skyaware/data-978/" => "/run/skyaware978/",
26   "/skyaware/" => "/usr/share/skyaware/html/"
27 )
28
29 # redirect the slash-less URL
30 url.redirect += (
31   "^/skyaware$" => "/skyaware/"
32 )
33
34 # Listen on port 8080 and serve the map there, too.
35 $SERVER["socket"] == ":8080" {
36   alias.url += (
37     "/data/" => "/run/dump1090-fa/",
38     "/data-978/" => "/run/skyaware978/",
39     "/" => "/usr/share/skyaware/html/"
40   )
41 }
42
43 # Add CORS header
44 server.modules += ( "mod_setenv" )
45 $HTTP["url"] =~ "^/skyaware/data/.*\.json$" {
46   setenv.set-response-header = ( "Access-Control-Allow-Origin" => "*" )
47 }
48
49 # Uncomment this section to enable SSL traffic (HTTPS) - especially useful
50 # for .dev domains
51 ## Listen on 8443 for SSL connections
52 #server.modules += ( "mod_openssl" )
53 #$HTTP["host"] == "piaware.example.com" {
54 #  $SERVER["socket"] == ":8443" {
55 #    ssl.engine = "enable"
56 #    ssl.pemfile = "/etc/ssl/certs/combined.pem"
57 #    ssl.ca-file =  "/etc/ssl/certs/fullchain.cer"
58 #    ssl.honor-cipher-order = "enable"
59 #    ssl.cipher-list = "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"
60 #    ssl.use-sslv2 = "disable"
61 #    ssl.use-sslv3 = "disable"
62 #
63 #  alias.url += (
64 #    "/data/" => "/run/dump1090-fa/",
65 #    "/" => "/usr/share/dump1090-fa/html/"
66 #  )
67 #  }
68 #}
69 #
70 ## Redirect HTTP to HTTPS
71 #$HTTP["scheme"] == "http" {
72 #  $HTTP["host"] =~ ".*" {
73 #    url.redirect = (".*" => "https://%0$0")
74 #  }
75 #}
1 Like

Check the result with the following command:

sudo systemctl status lighttpd
and
journalctl -xe

Then post the result here. Could be a permission problem

sudo mv -f /etc/lighttpd/conf-available/89-dump1090-fa.conf.dpkg-dist /etc/lighttpd/conf-available/89-dump1090-fa.conf
sudo systemctl restart lighttpd
1 Like

Bingo – the replacement of 89-dump1090-fa.conf did the trick.

Thanks!
Mark