Admin URL on port 80, just a directory listing, no login

Expected Behaviour:

Pihole should display the admin interface login screen.

Actual Behaviour:

When accessing http://{IP address without brackets}/admin I receive an Index of /admin

Debug Token:

Tried to do this but got curl: (22) The requested URL returned error: 500

This is not the URL for a web interface.

Try http://pi.hole/admin or http://{IP of the Pi-hole without brackets}/admin

From a client on the same network go to http://ip_address_of_pihole/admin in a web browser. Can you access it? If not can you post a screenshot of the browser and address bar please?

Sorry not sure what happened when formatting the URL of my initial post:
I am getting this behavior when going to
http://{IP of the Pi-hole without brackets}/admin

Fixed intial post in thread

It seems as if your upstream servers may not be set. To check, can you run the command below and copy and paste the output in here please? It just shows whether upstream servers are configured or not.

sudo grep -C 4 upstreams /etc/pihole/pihole.toml

To set them, if they are blank, this command will set them to Quad9's servers

sudo pihole-FTL --config dns.upstreams '["9.9.9.9","149.112.112.112"]'

Restart the FTL service, not sure if that's needed with the above but no harm in being sure.

sudo systemctl restart pihole-FTL.service

Try the grep command above again, should show the servers. If so, re-run the debug log and post the URL here.

sudo pihole -d

If you are seeing a directory listing, then you have another web server running in your server. Pi-hole web server won't show that.

1 Like
  # Example: [ "8.8.8.8", "127.0.0.1#5335", "docker-resolver" ]
  #
  # Possible values are:
  #     array of IP addresses and/or hostnames, optionally with a port (#...)
  upstreams = [
    "9.9.9.9",
    "149.112.112.112"
  ] ### CHANGED, default = []

It was initially set to Unbound so 127.0.0.1:5335, but figured trying the Quad9 servers above was worth a shot, but same result. Local file generated for the pihole -d command but unable to upload with curl.

Then check the [webserver] settings, find the ports line and post it here.

Also post here the entire *** [ DIAGNOSING ]: Ports in use section.

Hi, I have the same issue. I figured out that Apache2 is additionally running on my Debian system. Beside Unbound and PiHole no other services are needed. Would I solve the problem by uninstalling Apache2?

George

If you don't use Apache, you can safely uninstall it (or just disable it with sudo systemctl disable apache2).

After that you will need to restart pihole-FTL with sudo systemctl restart pihole-FTL.service.

3 Likes

Thanks this resolved it for me as well!

Here are the results that also show apache2 being the root cause

*** [ DIAGNOSING ]: Ports in use
[✓] udp:0.0.0.0:53 is in use by pihole-FTL
    udp:0.0.0.0:51820 is in use by <unknown>
    udp:0.0.0.0:123 is in use by pihole-FTL
    udp:127.0.0.1:5335 is in use by unbound
[✓] udp:*:53 is in use by pihole-FTL
    udp:*:51820 is in use by <unknown>
    udp:*:123 is in use by pihole-FTL
    tcp:0.0.0.0:22 is in use by dropbear
[✓] tcp:0.0.0.0:53 is in use by pihole-FTL
    tcp:127.0.0.1:5335 is in use by unbound
[✓] tcp:0.0.0.0:443 is in use by pihole-FTL
    tcp:[::]:22 is in use by dropbear
[✓] tcp:[::]:53 is in use by pihole-FTL
[✗] tcp:*:80 is in use by apache2 (https://docs.pi-hole.net/main/prerequisites/#ports)
[✓] tcp:[::]:443 is in use by pihole-FTL

I did end up rebooting the Raspberry Pi as the sytemctl didn't seem to do the trick by itself.

Also in case this helps others, I was running DietPi on Bookworm release.

Probably because we forgot to stop apache.

These commands should work:

sudo systemctl stop apache2
sudo systemctl disable apache2
sudo systemctl restart pihole-FTL.service
1 Like

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