I've been up and running with Pi-hole for a few weeks now and am really enjoying the experience.
I do however have a problem with the web monitoring software for my Solar energy inverter - essentially, I can see how much electricity my home Solar PV panels are generating when on the move. It's only configurable to DHCP, and therefore gets the pi-hole's DNS settings, which unfortunately means it no longer updates the online app with data (it updates on a 15 minute cycle).
I've tried whitelisting www.solaredge.com and several variations on the domain name but it doesn't help. I did however find a log in my router saying that it connected to an IP address http://217.68.149.124:22221
Unfortunately that doesn't remove to a domain in a web browser, but anyway, I tried to add it to the white list but because it's not a domain, it won't let me add it (through the dashboard interface)
This is a difficult one. However, note that if it contacts the server directly via an IP, then Pi-hole cannot block it as it can only block DNS requests! So the root of your problem has to be somewhere else.
How to proceed? Observe your query log on your web UI of Pi-hole to see which domain is Pi-holed where the client IP matches the local IP of the module that connects to the internet and we will find the solution together!
I have the same Problem here. My Pi is also used as web server, but if i request something like "192.168.1.2/webpage/", I recive an Page wich is telling me I have to whitelist "192.168.1.2". I can still access files like "192.168.1.2/webpage/test.php". Strange. I have to use modrewrite for my applications, so I have to access directories, too. Is there any solution?
By the way (but offtopic) is it possible to change the administration from /admin to /adblock? If change the dir with "mv", the page tells me my JS is not activated. I've also searched in your backend for direct requests to /admin but changing them to "/adblock" does not help.
Best regards,
Nico
(sorry for all language failures, I hope it wasn't to hrad to read)
The whitelist page is the 404 page for the webserver. http://192.168.1.2/webpage/ does not point to any html page, so the server returns a 404, which in our case is the whitelist page. http://192.168.1.2/webpage/test.php is an actual page, so the webserver returns that asset. The proper way would be to set your indexes if you want to just access a page via directory and not via the actual asset page. Or you can set the rules that redirects the directory to load an actual page. Just remember that any time you have a condition which will end up in 404 will return the whitelist page.
The default lighttpd config blocks JS files outside /admin, so you'd need to remove that line in order to move it. How about adding a rewrite rule to access it at another endpoint? Then the Pi-hole scripts that touch the web interface will still work.
Ihe fact, that I run an apache and want to use it in the future, too, I just changed the port in '/etc/lighttpd/lighttpd.conf' where the server is listen. Now it's not 80 anmore (I've changed it to 8001) and all my problems are solved.
Changeing the directory from /admin to /adblock is also done. Thanks to @Mcat12. It's quite easy:
rename 'admin' to what ever you want. In my case 'adblock'
open '/etc/lighttpd/lighttpd.conf'. Change this lines and replace 'admin' with your directory name.
open "adblock/scripts/pi-hole/js/queryads.js",
search for admin and replace it, too
reboot your pi
Perfect!
But if I do forget something or lighttpd have to run on port 80 for pihole or the dir 'admin' is needed for something else, please let me know
Keep in mind that some other scripts might not work since you changed the directory. The auto-updater definitely won't correctly update the web interface.
Pi-hole should be kept on port 80, because since that port is used by all web services like ad providers that is the domain that is hit for every blocked ad. We can only change the domain and not the port through DNS redirection.
If just changed the port in /etc/lighttpd/lighttpd.conf? Is lighttpd not only used as webserver for the admin panel? Seems like apache can do this job, too. Or am I wrong?
But the update will create an directory "admin" every time. I've tried it. Also the '/etc/lighttpd/lighttpd.conf' will be overwritten. Damn! I could resolve it with an simple bash, but this seems to be a little bit to dirty So the better way would be to change the html dir for apache. I hope it won't be a problem if both of them listen to the same port.
EDIT:
I've tryed all things, the only thing which would help is to change apaches port, if I try to run both, But I don't like this solution. If I remove lighttpd, all things seems to be fine. Did you know (or anyone else) know if "lighttpd" is really nessesary or just an webserver...?