Website on shared hosting with pi-hole is blocked

#1

Expected Behaviour:

My own website (same server with pi-hole) shouldn’t be blocked

Actual Behaviour:

Actually it is. Whitelisting the domain doesn’t help

Update: after some research I think the issue is in conflict of pi-hole and my current webserver (apache).
Tried to apply found fixes, but it didn’t worked for me. Please help.
Broken link sample:
http://bebinka.com/nooks-and-crannies/

Debug Token:

6cmqa3jos5

0 Likes

#2

Your Pi-hole is an open resolver. You should fix that before doing anything else.

0 Likes

#3

Thanks. I think, I fixed this just now.
But the main problem is still there.

0 Likes

#4

Make sure that each web server has its own port. You should really not be running Pi-hole on the same machine as your web site.

1 Like

#5

We’ve had some whitelisting issues with this release. Have you looked at this post?

0 Likes

#6

I’m on version 3.3 from the start.

0 Likes

#7

I tried to uninstall the pi-hole correctly, this renders all the previously blocked folders as 404…
How to fix…? It’s a basic WP installation on Apache and Ubuntu.

0 Likes

#8

Guys, it seems to me I dig down to the root of my issue – pi-hole replaced the lighttpd.conf, that’s why all the sub-dirs of my website except the / are returning 404 error.
How to fix this?
cat /etc/lighttpd/lighttpd.conf
# Pi-hole: A black hole for Internet advertisements
# © 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"
0 Likes

#9

If you create the external.conf file, you can set additional lighttpd directives.

0 Likes

closed #10

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

0 Likes