Hi folks,
after updating to Pi-hole Version v4.4 (Web Interface Version v4.3.3 FTL Version v4.3.1) lighttpd shows some strange behavior I'd like to ask you if you spot my failure at a single glance.
I do have a different document-root for URL's suffix /doctora that lighttpd answers with the appended screenshot
when requested from intranet or with the message "[ERROR]: Unable to parse results from queryads.php: Unhandled error message ( )" when requested from internet.
I appended lighttpd.conf (loading mod_alias) and external.conf (declaring an alias) that contains the redirect for /doctora to /home/pi/doctora/doctora
Can anybody tell me why this redirect is resolved to some error-message?
Many thanks in advance
Christian
lighttpd.conf
# 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_alias",
"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"
# https://doc.lighttpd.net/lighttpd2/mod_accesslog.html
accesslog.format = "%h %V %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
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" )
mimetype.assign = ( ".png" => "image/png",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".html" => "text/html",
".css" => "text/css; charset=utf-8",
".js" => "application/javascript",
".json" => "application/json",
".txt" => "text/plain",
".svg" => "image/svg+xml" )
# default listening port for IPv6 falls back to the IPv4 port
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
# 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
# This uses include_shell instead of an include wildcard for compatibility
include_shell "cat external.conf 2>/dev/null"
external.conf
$HTTP["remoteip"] !~ "192.168.178.10|192.168.178.20" {
$HTTP["url"] =~ "^/admin/" {
url.access-deny = ( "" )
}
}
$HTTP["url"] =~ "^/kattenwinkel($|/)" {
dir-listing.activate = "enable"
}
alias.url += ( "/doctora" => "/home/pi/doctora/doctora" )
access.log
192.168.178.20 192.168.178.30 - [04/Mar/2020:14:31:09 +0100] "GET / HTTP/1.1" 200 3767 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"
192.168.178.20 192.168.178.30 - [04/Mar/2020:14:31:10 +0100] "GET /Connectivity.css HTTP/1.1" 304 0 "http://192.168.178.30/" "Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"
192.168.178.20 192.168.178.30 - [04/Mar/2020:14:32:20 +0100] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"
192.168.178.20 192.168.178.30 - [04/Mar/2020:14:32:20 +0100] "GET /Connectivity.css HTTP/1.1" 304 0 "http://192.168.178.30/" "Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"
192.168.178.20 192.168.178.30 - [04/Mar/2020:14:32:47 +0100] "GET /kattenwinkel/ HTTP/1.1" 200 6963 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"
192.168.178.20 192.168.178.30 - [04/Mar/2020:14:33:09 +0100] "GET /doctora/ HTTP/1.1" 200 405 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"
192.168.178.20 192.168.178.30 - [04/Mar/2020:14:33:09 +0100] "GET /pihole/blockingpage.css HTTP/1.1" 304 0 "http://192.168.178.30/doctora/" "Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"
192.168.178.20 192.168.178.30 - [04/Mar/2020:14:33:09 +0100] "GET /admin/img/logo.svg HTTP/1.1" 304 0 "http://192.168.178.30/doctora/" "Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"
