Access WebUI through dedicated IP or https://pi.hoe/admin.
All devices on the network to work with most sites without issue.
Actual Behavior:
Unable to access WebUI through dedicated IP or http://pi.hole/admin.
Apple devices aren't able to browse the web when Windows can.
Debug Token:
lhilo3xqt5
Running through docker.
I've run pihole -r to no help.
All of the errors/warnings I encounter are as follows.
> [β] lighttpd daemon is inactive
> [β] pihole-FTL daemon is inactive
> WARNING Misconfigured DNS in /etc/resolv.conf: Two DNS servers are recommended, 127.0.0.1 and any backup server
> WARNING Misconfigured DNS in /etc/resolv.conf: Primary DNS should be 127.0.0.1 (found 127.0.0.11)
All of this is still occurring after I've removed the image, deleted the file system starting, and restarted the server.
Other troubleshooting/research I have done on this fresh build.
> sudo service lighttpd status -1
> up (pid 10346) 3869 seconds
> sudo service pihole-FTL status -1
> up (pid 10369) 3889 seconds
> sudo service dnsmasq status -1
> s6 service not found for dnsmasq, exiting...
> root@Unraid:~# docker logs Pi-Hole
> [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
> [s6-init] ensuring user provided files have correct perms...exited 0.
> [fix-attrs.d] applying ownership & permissions fixes...
> [fix-attrs.d] 01-resolver-resolv: applying...
> [fix-attrs.d] 01-resolver-resolv: exited 0.
> [fix-attrs.d] done.
> [cont-init.d] executing container initialization scripts...
> [cont-init.d] 20-start.sh: executing...
> ::: Starting docker specific checks & setup for docker pihole/pihole
> WARNING Misconfigured DNS in /etc/resolv.conf: Two DNS servers are recommended, 127.0.0.1 and any backup server
> WARNING Misconfigured DNS in /etc/resolv.conf: Primary DNS should be 127.0.0.1 (found 127.0.0.11)
>
> nameserver 127.0.0.11
> options ndots:0
> [i] Existing PHP installation detected : PHP version 7.0.33-0+deb9u5
>
> [i] Installing configs from /etc/.pihole...
> [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
> [β] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf
> chown: cannot access '/etc/pihole/dhcp.leases': No such file or directory
> ::: Pre existing WEBPASSWORD found
> Using custom DNS servers: 1.1.1.1 & 1.0.0.1
> DNSMasq binding to default interface: eth0
> Added ENV to php:
> "PHP_ERROR_LOG" => "/var/log/lighttpd/error.log",
> "ServerIP" => "192.168.1.199",
> "VIRTUAL_HOST" => "192.168.1.199",
> Using IPv4
> ::: Preexisting ad list /etc/pihole/adlists.list detected ((exiting setup_blocklists early))
> https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
> https://mirror1.malwaredomains.com/files/justdomains
> http://sysctl.org/cameleon/hosts
> https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
> https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
> https://hosts-file.net/ad_servers.txt
> ::: Testing pihole-FTL DNS: FTL started!
> ::: Testing lighttpd config: Syntax OK
> ::: All config checks passed, cleared for startup ...
> ::: Docker start setup complete
> [i] Pi-hole blocking is enabled
> [i] Neutrino emissions detected...
> [β] Pulling blocklist source list into range
>
> [i] Target: raw.githubusercontent.com (hosts)
> [β] Status: Retrieval successful
>
> [i] Target: mirror1.malwaredomains.com (justdomains)
> [β] Status: No changes detected
>
> [i] Target: sysctl.org (hosts)
> [β] Status: No changes detected
>
> [i] Target: s3.amazonaws.com (simple_tracking.txt)
> [β] Status: Connection Refused
> [β] List download failed: using previously cached list
>
> [i] Target: s3.amazonaws.com (simple_ad.txt)
> [β] Status: No changes detected
>
> [i] Target: hosts-file.net (ad_servers.txt)
> [β] Status: No changes detected
>
> [β] Consolidating blocklists
> [β] Extracting domains from blocklists
> [i] Number of domains being pulled in by gravity: 138911
> [β] Removing duplicate domains
> [i] Number of unique domains trapped in the Event Horizon: 116701
> [i] Nothing to whitelist!
> [i] Number of regex filters: 0
> [β] Parsing domains into hosts format
> [β] Cleaning up stray matter
>
> [β] DNS service is running
> [β] Pi-hole blocking is Enabled
> [cont-init.d] 20-start.sh: exited 0.
> [cont-init.d] done.
> [services.d] starting services
> Starting crond
> Starting pihole-FTL (no-daemon) as root
> Starting lighttpd
> [services.d] done.
> Stopping lighttpd
> Starting lighttpd
> Stopping lighttpd
> Starting lighttpd
> Stopping pihole-FTL
> Starting pihole-FTL (no-daemon) as root
That makes sense, the thing that I don't know, or am aware of any way to find out what is using njinx or how to create a rule to forward requests to a new port.
I shut down all of my other docker containers and there is no change in experience.
I've tried port 80 on 192.168.1.101:80 (server), 192.168.1.199:80 (pi-hole), and 0.0.0.0:80 (just to be sure I wasn't missing something) and nothing returns. Networking and Linux is definitely my achilles heal. .
Also there isn't a njinx folder in /etc/ within the Pi-hole container.
I got none ...
Meanwhile, see if editing the port information in /etc/lighttpd/lighttpd.conf and restarting lighttpd gets your /admin/ interface up (by using the IP:port address).
I can read files, but am not familiar in editing them outside of the docker template. The 80 port should be changed to 81 for Pi-hole, but I'm not able to confirm the change.
Here is the contents of /etc/lighttpd/lighttpd.conf
> # tail lighttpd.conf
> }
>
> # Block . files from being served, such as .git, .github, .gitignore
> $HTTP["url"] =~ "^/admin/\.(.*)" {
> url.access-deny = ("")
> }
Getting lost on this. This is what I was all I was able to do.
# sed 's/server.port 80/server.port 81/' 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_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" )
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
# 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"
# cat /etc/lighttpd/lighttpd.conf | grep server.port
server.port = 80
Is this in docker? What is your docker run command or your docker-compose file? You just need to map port 81 to 80. docker run -p 81:80 or something along those lines.
So as far as I know, a docker command can run through root, but not inside the Pi-hole container itself.
When I run docker run -p 81:80 in root.
root@Unraid:~# docker run -p 81:80
"docker run" requires at least 1 argument.
See 'docker run --help'.
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
Run a command in a new container
The sample command I gave was to add to your existing docker run command. Where you have -p 80:80 you replace that with -p 81:80 and then use http://pi.hole:81/admin/ as the interface URL.
http://pi.hole:81/admin/ instantly times out. and server.port still shows as 80. I'm not sure if I'm able to change the 80 port on this distro even though it's one of the options.
That's the support for the template, note the first post says:
This docker need ports 53 (dns) and 80 (web) to work correctly. Change your Unraid admin port to 81 or use the new Docker IP functionality in unraid v6.4 to give it its own ip address.
I created a new conatiner with the below configuration, all works on port 81. The Command showing is: