Last active
November 5, 2021 04:36
-
-
Save kmagdziak/49daac58bad7071e36a738da8aadb58e to your computer and use it in GitHub Desktop.
Running Pi-hole Docker Container with different docker port 80 mapping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Issue: Changing the docker port 80 to hosted port not 80 causes the following message: | |
[ERROR]: Unable to parse results from queryads.php: Unhandled error message (Invalid domain!) | |
## Solution courtesy of unitpas, modified by kmagdziak | |
docker exec -it pihole apt-get update | |
docker exec -it pihole apt-get install nano | |
docker exec -it pihole bash | |
nano /var/www/html/pihole/index.php | |
change | |
$serverName = htmlspecialchars($_SERVER["HTTP_HOST"]); | |
with | |
$serverName = htmlspecialchars($_SERVER["SERVER_ADDR"]); | |
Ctrl+O to save | |
Ctrl+X to exit | |
reload web page |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This also worked for me, looks like it needs to make it into the master branch.