If Pi-Hole is allowed to uninstall stated packages (above), system (sometimes) breaks and needs full reinstall. We really shouldnât be removing things like sudo, dialog, or othersâŚ
No issues seem to occur if the chosen web-server is Apache; this is an issue dependent on Nginx. I like NginxâŚ
Uncomment those two lines again and replace frame_option with frame_options (âsâ was missing).
I fixed the config in our master branch (from where it is downloaded on install), so a reinstall or fresh install of Pi-hole will now also have it fixed.
The Pi-Hole script gives the option to remove packages on uninstall that are listed as dependencies. This is in nature good, but the list of dependencies is large and can remove things like sudo. I think we should âfool-proofâ this a little more for those not looking, and possibly remove some of the packages from the list.
Hello. Sorry for bringing this up again but it seems that my pihole and nginx donât like each other.
I can access the pihole user interface by going to pi.hole/admin, but canât from 192.168.[restofip]/admin. Also my nextcloud stopped working (yesterday?) which I think is connected to this.
There is no real relation between PiHole and Nginx. PiHole web interface is a simple web app, like Nextcloud, that require a web server like Apache or Nginx to be able to be displayed. As you are able to reach pi.hole/admin indicates the web server running and working. Otherwise, this would be failing as well. How do you try reaching NC? Did you activate any special setting on your web server? What changed the last days that could be related to your issue?
Thatâs the million euro question⌠Of the more substantial things I did:
installed arp-scan (uninstalled it now)
installed and configured Navidrome (stopped and disabled the service now).
there were some updates to PHP (7.4)
And right now I canât get to http://pi.hole/admin any more. Really not sure why. I know pihole is running since all my DNS domains work, so itâs just nginx. Trying to reinstall PHP now using dietpi-software reinstall 89.
But I doesnât seem to be possible to run nginx in interactive modeâŚ
OK, weâre getting somewhere. After reinstalling PHP, nginx failed to start: nginx[11576]: nginx: [emerg] bind() to 0.0.0.0:80 failed(98: Address already in use). Reinstalling nginx using dietpi-software did not help.
I then purged nginx using dietpi-software and then installed it again - still it was failing to run.
I saw that one of my devices (projector) was connected to dietpi (by its standby wifi) using port 80 without nginx running. Turned it off; this did not help at all.
After rebooting when all of these things were done, nginx got up. Pihole did too but it did not work. pihole -d returned these errors:
[â] Web interface X-Header: X-Header does not match or could not be retrieved. HTTP/1.1 302 Found Server: nginx Date: Sat, 04 Mar 2023 21:25:58 GMT Content-Type: text/html; charset=UTF-8 Connection: keep-alive Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate Pragma: no-cache Set-Cookie: PHPSESSID=06d9vosk2fmkd1lvtafn8n7dst; path=/; HttpOnly; SameSite=Strict Location: login.php
And some irrelevant errors for lighttpd (which doesnât exist).
Error 2 is related to what you wrote above, so then I tried editing the lines again, but found /etc/nginx/sites-dietpi to be empty. I copied the needed nginx conf files from a backup (those without the need to edit them already) and error 2 disappeared, but error 1 stayed.
The error when I was trying to go to pi.hole/admin is âDNS_PROBE_FINISHED_NXDOMAINâ and if by IP it is âERR_CONNECTION_REFUSEDâ.
Right now I think itâs something connected to piholeâs webserver and nginxâs webserver fighting each other for port 80, but I really donât know a lot about networking.
There is no PiHole own web server. If you use our PiHole install script, PiHole is installed without web server stack, as we use our DietPi functionality to install user defined web server module. Could it be that you installed lighttpd? Did you execute any PiHole repair steps?
EDIT: ok, fixed this with selecting âPermit all originsâ in pihole, which somehow got reset when reinstalling.
But the primary thing still exists: nextcloud access from the Internet stopped working for some reason, as well as the nginx homepage. I will check my port forwards on routers, but I donât think they changed.
EDIT2: now it works but I did not do absolutely anything. I am at a loss. The only thing I needed to do again is install the letsencrypt certificate.
EDIT3: I suppose the culprit is navidrome, apparently everything stopped working around 8:41 AM (itâs 0:32 AM next day now). Iâll check detailed logs, but it was then that everything became âunavailableâ for home assistantâŚ
Yup, I used dmesg and journalctl extensively, but there was nothing pointing to an issue there. I made a mistake of rebooting the pi before looking at them more carefully though.
When this was happening, all the relevant services were running (active). I am just curious why nginx would not start because âaddress was already in useâ - I did not have any other running services which I read could interfere (apache, lighttpd).
Anyway, the first command only shows 1 thing right now: bcm2708_fb soc:fb: Unable to determine number of FBs. Disabling driver.
Same as here. Weird reboot behaviour on RPi 4 B - #2 by Joulinar
Doesnât seem relevant as itâs a headless server.
The folder is removed on uninstall. And this you did
PiHole web server configuration is pulled on install/reinstall only. It is not done on install of Nginx, because we donât pull all kind of configs. This is triggered by the dedicated app only.