Expected Behaviour:
WebUI should be working
DietPi
Actual Behaviour:
WebUI is not working, getting a 404 error
WebUI should be working
DietPi
WebUI is not working, getting a 404 error
How did you try to access your Pi-hole's UI?
I've tried pihole -r and that didn't fix it. It seems like lighttpd is purposely denying the traffic as if it were external/public traffic, but I can't find how to change this.
Your debug log shows lighttpd to be operational:
*** [ DIAGNOSING ]: Lighttpd configuration test
[ā] No error in lighttpd configuration
*** [ DIAGNOSING ]: Dashboard headers
[ā] Web interface X-Header: X-Pi-hole: The Pi-hole Web interface is working!
As far as Pi-hole is concerned, your web configuration looks ok.
How did you install Pi-hole on DietPi?
Via Pi-hole's installer or via DietPi's software manager?
In the latter case, DietPi would provide its own lighttpd
configuration.
Probably unrelated, but your debug log also shows that your DHCP server is distributing itself for DNS, next to Pi-hole:
*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
Scanning all your interfaces for DHCP servers
* Received 300 bytes from eth0:192.168.0.1
Offered IP address: 192.168.0.100
DHCP options:
Message type: DHCPOFFER (2)
dns-server: 192.168.0.100
dns-server: 192.168.0.1
router: 192.168.0.1
--- end of options ---
This would allow clients to by-pass Pi-hole via your router, and it may also cause failures to access Pi-hole's web UI by domain (as 192.168.0.1 wouldn't know how to resolve pi.hole
).
Pi-hole has to be the only DNS server for your network.
This bottom part of the config does so for the deprecated block/404 page only, i.e. when you access the /pihole
or /html/pihole
path. It is however not used anymore anyway, unless you configure Pi-hole actively to do so.
Access to /admin
should be allowed. There is a dialogue asking whether you want to block public access to the admin panel as well, and this can block local access if you access via IPv6 and do not use ULAs in your network, but you are accessing via IPv4 address explicitly.
However, just to rule it out, can you try this:
mv /etc/nginx/sites-dietpi/dietpi-pihole-block_public_admin.{on,off}
systemctl restart lighttpd
As of the Lighttpd config, via dietpi-software
.
I've installed it via DietPi's software manager.
I don't think I can change that DNS option in my network, since my router is stock and it does not give me the option.
This command
"mv /etc/nginx/sites-dietpi/dietpi-pihole-block_public_admin.{on,off}
systemctl restart lighttpd"
won't work, I don't have nginx
I'm not sure how to configure Lighttpd, I'm doing some research to understand it better, but I expected it to just work as I followed the dietpi guide
There are three ways:
All of them are not possible with your router? Then I guess you would need to configure Pi-hole as DNS for all DHCP clients manually, to guarantee they use Pi-hole only .
Ah my fault, this one:
lighty-disable-mod dietpi-pihole-block_public_admin
systemctl restart lighttpd
Okay, then this block config was not enabled in the first place. Although, weird is that it is not present at all in your case. I just did a test install:
root@VM-Bookworm:~# lighty-disable-mod dietpi-pihole-block_public_admin
Already disabled dietpi-pihole-block_public_admin
Can you see whether the file exists?
ls -l /etc/lighttpd/conf-available/99-dietpi-pihole-block_public_admin.conf
It is created in any case during the installation, just not enabled by default.
Did your installation fail and abort at some point? It could have been the download of exactly this config. That would explain the 404 as well, as the needed symlinks are created afterwards. E.g. try this:
curl -IL http://192.168.0.100/html/admin/
http://192.168.0.100/html/admin/ works!!
I did not see any failures, and I ran runpi -r before and that also ran successfully.
Anyway, I can use this access
Please do the installation again:
dietpi-software install 93
Else there are some configuration steps missing, database access from the web UI (query logs) won't work etc.
And watch out for
DietPi-Software
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Step: Install completed
In case of a failure there would be some red [FAILED]
at the end of the output.
This worked like a charm, now I can access it via http://192.168.0.100/admin/
ĀÆ_(ć)_/ĀÆ
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.