Pi-hole and piaware - lighttpd?

I have installed the piaware, flightradar24 and pi-hole on my pi3, stretch.
The piaware creates a webpage at address Pi_IP:8080 or Pi_IP/dump1090
That should not interfere with the Pi_IP/admin at port 80... but it did. Now the Pi_IP/dump1090 page shows a generic Pi-hole page "Pi-hole: Your black hole for Internet advertisements".
Pi_IP:8080 generates
"[ERROR]: Unable to parse results from queryads.php: Unhandled error message (Invalid domain!)"

Note that Pi_IP:8754 is correctly showing the FR24 stats.
Any ideas how to solve this conflict (probably in lighttpd)

What does your /etc/lighttpd/lighttpd.conf file look like? Can you cat that file and post the results here for us to look at. And a pihole -d debug token would help us a lot.

# Pi-hole: A black hole for Internet advertisements
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
#
# Lighttpd config for Pi-hole
#
# This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license.

###############################################################################
#     FILE AUTOMATICALLY OVERWRITTEN BY PI-HOLE INSTALL/UPDATE PROCEDURE.     #
# ANY CHANGES MADE TO THIS FILE AFTER INSTALL WILL BE LOST ON THE NEXT UPDATE #
#                                                                             #
#              CHANGES SHOULD BE MADE IN A SEPARATE CONFIG FILE:              #
#                         /etc/lighttpd/external.conf                         #
###############################################################################

server.modules = (
	"mod_access",
	"mod_accesslog",
	"mod_auth",
	"mod_expire",
	"mod_compress",
	"mod_redirect",
	"mod_setenv",
	"mod_rewrite"
)

server.document-root        = "/var/www/html"
server.error-handler-404    = "pihole/index.php"
server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
server.errorlog             = "/var/log/lighttpd/error.log"
server.pid-file             = "/var/run/lighttpd.pid"
server.username             = "www-data"
server.groupname            = "www-data"
server.port                 = 80
accesslog.filename          = "/var/log/lighttpd/access.log"
accesslog.format            = "%{%s}t|%V|%r|%s|%b"

index-file.names            = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny             = ( "~", ".inc", ".md", ".yml", ".ini" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

compress.cache-dir          = "/var/cache/lighttpd/compress/"
compress.filetype           = ( "application/javascript", "text/css", "text/html", "text/plain" )

# default listening port for IPv6 falls back to the IPv4 port
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"

# Prevent Lighttpd from enabling Let's Encrypt SSL for every blocked domain
#include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
include_shell "find /etc/lighttpd/conf-enabled -name '*.conf' -a ! -name 'letsencrypt.conf' -printf 'include \"%p\"\n' 2>/dev/null"

# If the URL starts with /admin, it is the Web interface
$HTTP["url"] =~ "^/admin/" {
    # Create a response header for debugging using curl -I
    setenv.add-response-header = (
        "X-Pi-hole" => "The Pi-hole Web interface is working!",
        "X-Frame-Options" => "DENY"
    )

    $HTTP["url"] =~ ".ttf$" {
        # Allow Block Page access to local fonts
        setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
    }
}

# Block . files from being served, such as .git, .github, .gitignore
$HTTP["url"] =~ "^/admin/\.(.*)" {
     url.access-deny = ("")
}

# Add user chosen options held in external file
include_shell "cat external.conf 2>/dev/null"

That looks fine, try accessing the PiAware page as you normally would, and then check /var/log/lighttpd/access.log and /var/log/lighttpd/error.log for any 404 errors. The generic dark page is a result of a 404 response from lighttpd when trying to view that page.

debug token is: dc2rma6s2y

The debug token shows that lighttpd is open on port 80 and 8080, so there is either another lighttpd daemon running or there's another configuration file that tells it to listen on the 8080 port.

It should be the piaware webpage...
Anyway, on the logs, with scp, I get:
Permission denied.
Error code: 3
Error message from server: Permission denied

You might want to check with Oliver on PiAware and ask him where he sets the configuration for lighttpd with that package. You need sudo access to see the logs, they are privileged files.

Is there an /etc/lighttpd/external.conf file?

I didn't see Oliver on the FA forum in a while. I wonder if he is still working for FA...

It's been a few years since I ran PiAware, good timing as I was going to set up a card with the software and tune a few antennae here to pick up KSNA.

There is avail also a script that provide more info on a front page:

But that conflicts also with port 80

1 Like

Thanks, when I get a few minutes I'll take a look and see. But for now, it does look like there's an external.conf file or another configuration file that is adding the 8080, if you can get in to see the access.log and error.log files it would help out tracking down where the hang up could be.

Access.log
1526561972|192.168.1.232|GET /admin HTTP/1.1|301|0
1526561973|192.168.1.232|GET /admin/ HTTP/1.1|200|14364
1526561973|192.168.1.232|GET /admin/style/vendor/bootstrap/css/bootstrap.min.css HTTP/1.1|200|19896
1526561973|192.168.1.232|GET /admin/style/vendor/font-awesome-4.5.0/css/font-awesome.min.css HTTP/1.1|200|6286
1526561973|192.168.1.232|GET /admin/style/vendor/ionicons-2.0.1/css/ionicons.min.css HTTP/1.1|200|8360
1526561973|192.168.1.232|GET /admin/style/vendor/dataTables.bootstrap.min.css HTTP/1.1|200|944
1526561973|192.168.1.232|GET /admin/style/vendor/daterangepicker.css HTTP/1.1|200|1440
1526561973|192.168.1.232|GET /admin/style/vendor/AdminLTE.min.css HTTP/1.1|200|13719
1526561973|192.168.1.232|GET /admin/style/pi-hole.css HTTP/1.1|200|1243
1526561973|192.168.1.232|GET /admin/style/vendor/skin-blue.min.css HTTP/1.1|200|733
1526561973|192.168.1.232|GET /admin/style/vendor/js-warn.css HTTP/1.1|200|553
1526561973|192.168.1.232|GET /admin/scripts/pi-hole/js/header.js HTTP/1.1|200|293
1526561973|192.168.1.232|GET /admin/img/logo.svg HTTP/1.1|200|1649
1526561973|192.168.1.232|GET /admin/img/donate.gif HTTP/1.1|200|3592
1526561973|192.168.1.232|GET /admin/style/vendor/SourceSansPro/SourceSansPro.css HTTP/1.1|200|252
1526561973|192.168.1.232|GET /admin/scripts/vendor/jquery.min.js HTTP/1.1|200|29569
1526561973|192.168.1.232|GET /admin/style/vendor/bootstrap/js/bootstrap.min.js HTTP/1.1|200|9764
1526561973|192.168.1.232|GET /admin/scripts/vendor/app.min.js HTTP/1.1|200|2868
1526561973|192.168.1.232|GET /admin/scripts/vendor/jquery.dataTables.min.js HTTP/1.1|200|28013
1526561973|192.168.1.232|GET /admin/scripts/vendor/jquery-ui.min.js HTTP/1.1|200|64483
1526561973|192.168.1.232|GET /admin/scripts/pi-hole/js/index.js HTTP/1.1|200|5944
1526561973|192.168.1.232|GET /admin/scripts/vendor/dataTables.bootstrap.min.js HTTP/1.1|200|1058
1526561973|192.168.1.232|GET /admin/scripts/pi-hole/js/footer.js HTTP/1.1|200|1846
1526561973|192.168.1.232|GET /admin/img/boxed-bg.jpg HTTP/1.1|200|123770
1526561973|192.168.1.232|GET /admin/scripts/vendor/Chart.bundle.min.js HTTP/1.1|200|62602
1526561973|192.168.1.232|GET /admin/style/vendor/font-awesome-4.5.0/fonts/fontawesome-webfont.woff2?v=4.5.0 HTTP/1.1|200|66624
1526561973|192.168.1.232|GET /admin/style/vendor/SourceSansPro/SourceSansPro-Bold.ttf HTTP/1.1|200|148932
1526561973|192.168.1.232|GET /admin/style/vendor/SourceSansPro/SourceSansPro-Regular.ttf HTTP/1.1|200|149972
1526561973|192.168.1.232|GET /admin/style/vendor/ionicons-2.0.1/fonts/ionicons.ttf?v=2.0.0 HTTP/1.1|200|188508
1526561973|192.168.1.232|GET /admin/style/vendor/SourceSansPro/SourceSansPro-Semibold.ttf HTTP/1.1|200|149636
1526561973|192.168.1.232|GET /admin/api.php?summary HTTP/1.1|200|244
1526561973|192.168.1.232|GET /admin/api.php?overTimeData10mins HTTP/1.1|200|72
1526561973|192.168.1.232|GET /admin/img/favicon.png HTTP/1.1|200|8675
1526561974|192.168.1.232|GET /admin/api.php?summary HTTP/1.1|200|244
1526561975|192.168.1.232|GET /admin/api.php?summary HTTP/1.1|200|244
1526561976|192.168.1.232|GET /admin/api.php?summary HTTP/1.1|200|244
1526561977|192.168.1.232|GET /admin/api.php?summary HTTP/1.1|200|244
1526561978|192.168.1.232|GET /admin/api.php?summary HTTP/1.1|200|244
1526561979|192.168.1.232|GET /admin/api.php?summary HTTP/1.1|200|244
1526561981|192.168.1.232|GET /admin/api.php?summary HTTP/1.1|200|244
1526561981|192.168.1.232|GET /admin/index.php?login HTTP/1.1|200|14384
1526561981|192.168.1.232|GET /admin/style/vendor/bootstrap/css/bootstrap.min.css HTTP/1.1|200|19896
1526561981|192.168.1.232|GET /admin/style/vendor/AdminLTE.min.css HTTP/1.1|200|13719
1526561981|192.168.1.232|GET /admin/style/vendor/skin-blue.min.css HTTP/1.1|200|733
1526561981|192.168.1.232|GET /admin/style/pi-hole.css HTTP/1.1|200|1243
1526561981|192.168.1.232|GET /admin/scripts/pi-hole/js/header.js HTTP/1.1|200|293
1526561981|192.168.1.232|GET /admin/style/vendor/SourceSansPro/SourceSansPro.css HTTP/1.1|200|252
1526561981|192.168.1.232|GET /admin/style/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2 HTTP/1.1|200|18028
1526561993|192.168.1.232|POST /admin/index.php?login HTTP/1.1|302|0
1526561993|192.168.1.232|GET /admin/index.php HTTP/1.1|200|24919
1526561993|192.168.1.232|GET /admin/style/vendor/font-awesome-4.5.0/css/font-awesome.min.css HTTP/1.1|304|0
1526561993|192.168.1.232|GET /admin/style/vendor/bootstrap/css/bootstrap.min.css HTTP/1.1|200|19896
1526561993|192.168.1.232|GET /admin/style/vendor/ionicons-2.0.1/css/ionicons.min.css HTTP/1.1|200|8360
1526561993|192.168.1.232|GET /admin/style/vendor/dataTables.bootstrap.min.css HTTP/1.1|200|944
1526561993|192.168.1.232|GET /admin/style/vendor/daterangepicker.css HTTP/1.1|304|0
1526561993|192.168.1.232|GET /admin/scripts/vendor/jquery.min.js HTTP/1.1|304|0
1526561993|192.168.1.232|GET /admin/scripts/vendor/jquery-ui.min.js HTTP/1.1|304|0

Error.log

018-05-17 12:39:36: (log.c.217) server started
2018-05-17 12:39:42: (server.c.1828) server stopped by UID = 0 PID = 1
2018-05-17 12:39:43: (log.c.217) server started
2018-05-17 12:39:57: (server.c.1828) server stopped by UID = 0 PID = 1
2018-05-17 12:40:12: (log.c.217) server started
2018-05-17 12:55:16: (server.c.1828) server stopped by UID = 0 PID = 1
2018-05-17 12:58:28: (log.c.217) server started
2018-05-17 12:58:28: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
2018-05-17 12:58:28: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
2018-05-17 13:33:02: (server.c.1828) server stopped by UID = 0 PID = 1
2018-05-17 13:33:34: (log.c.217) server started
2018-05-17 13:33:34: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
2018-05-17 13:33:34: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
2018-05-17 14:07:48: (log.c.217) server started
2018-05-17 14:07:48: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
2018-05-17 14:07:48: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)

That's really strange, did you try to go to the PiAware page when those logs were generated? I don't see anything other than /admin site hits.

Well... I did. I have the query logs disabled though in administration page, to avoid wear on SD card - is that affecting this?

Is this discussion about maps and lighttpd of any help (I use the 1090-fa decoder)?

If you can get the actual logs, enable it for a short time, then it's going to be a whole lot easier. What I think is happening is that the URL is http://<pi>/flightawarepage/ and it just redirects http://<pi>/flightawarepage to that other URL with the trailing slash. That can be caught in the 404 mechanism and instead of rewriting the URL with the trailing slash and redirecting, it's being handled as a file not found and tripping up in the Pi-hole 404 setup.

I did enable them. What logs do you need? The lighttpd error and access are not changed from what I see... don't know why.

Is there an /etc/lighttpd.d directory? Or that kind of a directory in /etc/lighttpd/?