Hi everyone, my default lighttpd.conf works fine, but after installing it gets replaced by the one from pi-hole: lighttpd.conf.
It says that your own files should be located at:
# Add user chosen options held in external file
include_shell "cat external.conf 2>/dev/null"own
Actual Behaviour:
Starting with HTTPS:// blocks everything
Cant reach my website at al, located at /var/www/html/
replaced it with the original lighttpd.conf and I get that the FLT engine is offline
Debug Token:
---=== Your debug token is : dqrug3htaq Please make a note of it. ===---
# Pihole custom shizzle
# Rewite js requests, must be out of $HTTP block due to bug #2526
url.rewrite = ( "^(?!/admin/).*\.js$" => "pihole/index.js" )
# If the URL does not start with /admin, then it is a query for an ad domain
$HTTP["url"] =~ "^(?!/admin)/.*" {
# Create a response header for debugging using curl -I
setenv.add-response-header = ( "X-Pi-hole" => "A black hole for Internet advertisements." )
}
Then use the following commands:
$ sudo service lighttpd reload
$ sudo service lighttpd restart
Make a crontab with
sudo crontab -e
And add the following, the first lighttpd.conf should be the one you just edited and it will replace the lighttpd.conf editied by the updater of pihole.
Please be aware that this file is volatile and changes to it directly are subject to change and overwrite by the Pi-hole update and install process.
dschaper@nanopineo:/etc/lighttpd$ cat 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 SEPERATE CONFIG FILE: #
# /etc/lighttpd/external.conf #
###############################################################################
In /etc/dnsmasq.d create the file 04-customRedirect.conf with the following line
addn-hosts=/etc/customRedirect.list
in this file.
In /etc create the file customRedirect.list with the following line
192.168.x.xxx
where 192.168.x.xxx is the IP address of the PiHole
More lines could be added in this file, like
www.google.com www.bing.com
but also redirections to a locale webserver
So, with this configuration I run 2 websites local: google ajax and code.jquery.com