Pi-hole and piaware - lighttpd?

Yes, there are two directories inside.
conf-available
conf-enabled

The conf-enabled folder has a file that is called "89-dump1090-fa.conf" that looks like this:

# 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.

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

# redirect the slash-less URL
url.redirect += (
  "^/dump1090-fa$" => "/dump1090-fa/"
)

# Listen on port 8080 and serve the map there, too.
$SERVER["socket"] == ":8080" {
  alias.url += (
    "/data/" => "/run/dump1090-fa/",
    "/" => "/usr/share/dump1090-fa/html/"
  )
}

Then is another file called "15-fastcgi-php.conf":

# -*- depends: fastcgi -*-
# /usr/share/doc/lighttpd/fastcgi.txt.gz
# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions#mod_fastcgi-fastcgi

## Start an FastCGI server for php (needs the php5-cgi package)
fastcgi.server += ( ".php" =>
        ((
                "bin-path" => "/usr/bin/php-cgi",
                "socket" => "/var/run/lighttpd/php.socket",
                "max-procs" => 1,
                "bin-environment" => (
                        "PHP_FCGI_CHILDREN" => "4",
                        "PHP_FCGI_MAX_REQUESTS" => "10000"
                ),
                "bin-copy-environment" => (
                        "PATH", "SHELL", "USER"
                ),
                "broken-scriptfilename" => "enable"
        ))
)


# Add CORS header
server.modules += ( "mod_setenv" )
$HTTP["url"] =~ "^/dump1090-fa/data/.*\.json$" {
  setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
}

If you go to http://<PI>/dump1090-fa/ with the trailing slash, does it show you the Pi-hole dark page?

Yep, same page with or without trailing

Okay, try curl -I http://<PI>/dump1090-fa/ with and without the slash.

In SSH window?

HTTP/1.1 301 Moved Permanently
Location: /dump1090-fa/
Date: Fri, 18 May 2018 01:28:29 GMT
Server: lighttpd/1.4.45

And the URL with the trailing slash?

HTTP/1.1 200 OK
Content-type: text/html; charset=UTF-8
Date: Fri, 18 May 2018 01:30:23 GMT
Server: lighttpd/1.4.45

Hmm, that's what it should be doing for the PiAware to display, as a show of what the headers look like, try curl http://<PI> alone, it should show some X-Headers that say it's being served by Pi-hole.

pi@raspberrypi:/home $ curl -I http://127.0.0.1
HTTP/1.1 200 OK
Content-type: text/html; charset=UTF-8
Date: Fri, 18 May 2018 01:32:38 GMT
Server: lighttpd/1.4.45

pi@raspberrypi:/home $ curl http://127:0.0.1
curl: (7) Couldn't connect to server

127.0.0.1 :slight_smile:

Had a couple of beers :slight_smile:
pi@raspberrypi:/home $ curl http://127.0.0.1

    <html><head>
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
        <link rel='stylesheet' href='/pihole/blockingpage.css' type='text/css'/>
    </head><body id='splashpage'><img src='/admin/img/logo.svg'/><br/>Pi-<b>hole</b>: Your black hole for Internet advertisements</body></html>

Heh, curl -I http://127.0.0.1/admin/ next.

pi@raspberrypi:/home $ curl -I http://127.0.0.1/admin/
HTTP/1.1 200 OK
X-Pi-hole: The Pi-hole Web interface is working!
X-Pi-hole: The Pi-hole Web interface is working!
X-Frame-Options: DENY
X-Frame-Options: DENY
Set-Cookie: PHPSESSID=04r142otsubsap4ep1ro3je9j2; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Content-type: text/html; charset=UTF-8
Date: Fri, 18 May 2018 01:38:23 GMT
Server: lighttpd/1.4.45

Those X-headers should only appear once, if they are there twice there is a loop somewhere that is probably contributing to the problem.

curl -I http://<PI>:8080/dump1090-fa/ since that is on a differnt port.

You like to make me type 127.0.0.1 :smiley:

pi@raspberrypi:/home $ curl -I http://127.0.0.1:8080/dump1090-fa/

HTTP/1.1 200 OK
Content-type: text/html; charset=UTF-8
Date: Fri, 18 May 2018 01:41:27 GMT
Server: lighttpd/1.4.45

Last check curl http://127.0.0.1:8080/dump1090-fa/

pi@raspberrypi:/home $ curl http://127.0.0.1:8080/dump1090-fa/
[ERROR]: Unable to parse results from queryads.php: Unhandled error message (Invalid domain!)

One more check, it's verbose, but it will show the paths. curl -ILv http://127.0.0.1:8080/dump1090-fa/

pi@raspberrypi:/home $ curl -ILv http://127.0.0.1:8080/dump1090-fa/

  • Trying 127.0.0.1...
  • TCP_NODELAY set
  • Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)

HEAD /dump1090-fa/ HTTP/1.1
Host: 127.0.0.1:8080
User-Agent: curl/7.52.1
Accept: /

< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Content-type: text/html; charset=UTF-8
Content-type: text/html; charset=UTF-8
< Date: Fri, 18 May 2018 01:56:31 GMT
Date: Fri, 18 May 2018 01:56:31 GMT
< Server: lighttpd/1.4.45
Server: lighttpd/1.4.45

<

  • Curl_http_done: called premature == 0
  • Connection #0 to host 127.0.0.1 left intact

There's no Pi-hole involvement in that. curl -Lv http://127.0.0.1/dump1090-fa/