Pi-hole is working but no webui in Fresh install

Expected Behaviour:

WebUI should be working
DietPi

Actual Behaviour:

WebUI is not working, getting a 404 error

Debug Token:

https://tricorder.pi-hole.net/DzHhumtj/

How did you try to access your Pi-hole's UI?

Via web browser on the http://192.168.0.100/admin/

I'm actually getting a 404 error

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:

  • Configure the upstream DNS your router uses to resolve DNS query to use Pi-hole.
  • Configure the DNS your router's DHCP server distributes to Pi-hole exclusively.
  • Disable the router's DHCP server and use Pi-hole as DHCP server instead.

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 :thinking:.

Ah my fault, this one:

lighty-disable-mod dietpi-pihole-block_public_admin
systemctl restart lighttpd

Unfortunately this is still a no go:

I will look into the upstream DNS config

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.

1 Like

This worked like a charm, now I can access it via http://192.168.0.100/admin/

ĀÆ_(惄)_/ĀÆ

1 Like

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