Like others - admin page not showing :(

I have installed this on a Intel Nuc running Ubuntu, installed Pi-Hole with the Bash script option and that seemed to complete fine.

I've checked what's running on port 80, and its returns pihole-FTL
I turned off the UFW with sudo systemctl disable ufw

I did upload my debug info, its located at: https://tricorder.pi-hole.net/NAGE5z5R/

I also tried to reach the admin page with my Mac as a client on the network, and ran: curl -v http://192.168.1.27/admin/login.php

It returned:

*   Trying 192.168.1.27:80...
* Connected to 192.168.1.27 (192.168.1.27) port 80
> GET /admin/login.php HTTP/1.1
> Host: 192.168.1.27
> User-Agent: curl/8.7.1
> Accept: */*
> 
* Request completely sent off
< HTTP/1.1 404 Not Found
< Cache-Control: no-cache, no-store, must-revalidate, private, max-age=0
< Expires: 0
< Pragma: no-cache
< X-DNS-Prefetch-Control: off
< Content-Security-Policy: default-src 'self' 'unsafe-inline';
< X-Frame-Options: DENY
< X-XSS-Protection: 0
< X-Content-Type-Options: nosniff
< Referrer-Policy: strict-origin-when-cross-origin
< Content-Type: text/html; charset=utf-8
< Date: Thu, 22 May 2025 23:34:44 GMT
< Connection: close
< 
<!DOCTYPE html>
<!--
*  Pi-hole: A black hole for Internet advertisements
*  (c) 2017 Pi-hole, LLC (https://pi-hole.net)
*  Network-wide ad blocking via your own hardware.
*
*  This file is copyright under the latest version of the EUPL.
*  Please see LICENSE file for your rights under this license.
-->
<html lang="en">
<head>
    <meta charset="utf-8">
    <!-- Usually browsers proactively perform domain name resolution on links that the user may choose to follow. We disable DNS prefetching here -->
    <meta http-equiv="x-dns-prefetch-control" content="off">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Pi-hole pihole</title>

    <meta name="csrf-token" content="">

    <link rel="apple-touch-icon" href="/admin/img/favicons/apple-touch-icon.png" sizes="180x180">
    <link rel="icon" href="/admin/img/favicons/favicon-32x32.png" sizes="32x32" type="image/png">
    <link rel="icon" href="/admin/img/favicons/favicon-16x16.png" sizes="16x16" type="image/png">
    <link rel="manifest" href="/admin/img/favicons/manifest.json">
    <link rel="mask-icon" href="/admin/img/favicons/safari-pinned-tab.svg" color="#367fa9">
    <link rel="shortcut icon" href="/admin/img/favicons/favicon.ico">
    <meta name="msapplication-TileColor" content="#367fa9">
    <meta name="msapplication-TileImage" content="/admin/img/favicons/mstile-150x150.png">
    <meta name="theme-color" content="#367fa9">

    <!-- Theme fonts -->
    <link rel="stylesheet" href="/admin/vendor/fonts/source-sans-pro/source-sans-pro.css?v=1747885486">

    <style>
        html { background-color: #000; }
    </style>

    <!-- Common styles -->
    <link rel="stylesheet" href="/admin/vendor/bootstrap/css/bootstrap.min.css?v=1747885486">
    <link rel="stylesheet" href="/admin/vendor/animate/animate.min.css?v=1747885486">
    <link rel="stylesheet" href="/admin/vendor/bstreeview/bstreeview.min.css?v=1747885486">
    <link rel="stylesheet" href="/admin/vendor/font-awesome/css/all.min.css?v=1747885486">
    <link rel="stylesheet" href="/admin/vendor/nprogress/nprogress.min.css?v=1747885486">

    <link rel="stylesheet" href="/admin/vendor/waitMe-js/waitMe.min.css?v=1747885486">
    <link rel="stylesheet" href="/admin/vendor/select2/select2.min.css?v=1747885486">
    <link rel="stylesheet" href="/admin/vendor/adminLTE/AdminLTE.min.css?v=1747885486">

    <!-- Theme styles (default-auto) -->
    <link rel="stylesheet" href="/admin/style/pi-hole.css?v=1747885486">
    <link rel="stylesheet" href="/admin/style/themes/default-dark.css?v=1747885486" media="(prefers-color-scheme: dark)">
    <link rel="stylesheet" href="/admin/style/themes/default-light.css?v=1747885486" media="not (prefers-color-scheme: dark)">

    <noscript><link rel="stylesheet" href="/admin/vendor/js-warn/js-warn.css?v=1747885486"></noscript>

    <!-- scripts -->
    <script defer src="/admin/vendor/jquery/jquery.min.js?v=1747885486"></script>
    <script defer src="/admin/vendor/bootstrap/js/bootstrap.min.js?v=1747885486"></script>
    <script defer src="/admin/vendor/adminLTE/adminlte.min.js?v=1747885486"></script>
    <script defer src="/admin/vendor/bootstrap-notify/bootstrap-notify.min.js?v=1747885486"></script>
    <script defer src="/admin/vendor/waitMe-js/modernized-waitme-min.js?v=1747885486"></script>
    <script defer src="/admin/vendor/nprogress/nprogress.min.js?v=1747885486"></script>
    <script defer src="/admin/scripts/js/utils.js?v=1747885486"></script>
<body class="hold-transition layout-boxed login-page">
    <div class="box login-box">
        <section style="padding: 15px;">
                <h2 class="error-headline text-yellow">404</h2>
                <div class="error-content">
                    <h3><i class="fa fa-warning text-yellow"></i> Oops! Page not found.</h3>
                    <p>
                        We could not find the page you were looking for.<br>
                        Meanwhile, you may want to return to <a href="/admin/">the dashboard</a>.
                    </p>
            </div>
        </section>
    </div>
</body>
</html>
* Closing connection

Thanks for any assistance :slight_smile:

You are running Pi-hole v6, but the URL you are trying to connect only exists in Pi-hole v5. There is no PHP anymore.

The correct URL is http://192.168.1.27/admin/login (note: you don't need the /login part)

You can use any of the following URLs:

And based on on that new info, the url returns:

curl -v http://192.168.1.27/admin/         
*   Trying 192.168.1.27:80...
* Connected to 192.168.1.27 (192.168.1.27) port 80
> GET /admin/ HTTP/1.1
> Host: 192.168.1.27
> User-Agent: curl/8.7.1
> Accept: */*
> 
* Request completely sent off
< HTTP/1.1 302 Found
< Location: /admin/login
< 
* no chunk, no close, no size. Assume close to signal end
* Closing connection

If you enable dubugging with below:

sudo pihole-FTL --config debug.webserver true

And tail/follow the log life with below:

sudo tail -F /var/log/pihole/webserver.log

Does that curl register?

EDIT: Oh for diagnosing you could use below instead:

curl -ILv http://192.168.1.27/admin/

-I for headers only and -L to follow links.

Dont forget to set it back to false when done diagnosing!

EDIT2: My reply:

$ curl -ILv http://10.0.0.7/admin/
*   Trying 10.0.0.7:80...
* Connected to 10.0.0.7 (10.0.0.7) port 80 (#0)
> HEAD /admin/ HTTP/1.1
> Host: 10.0.0.7
> User-Agent: curl/7.88.1
> Accept: */*
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
[..]

This means it was found.

Also note that running curl -IL http://192.168.1.27/admin (without the final slash) will show the headers, including the redirect to http://192.168.1.27/admin/login... something like this:

HTTP/1.1 308 Permanent Redirect
Location: /admin/
Cache-Control: max-age=3600
Content-Security-Policy: default-src 'self' 'unsafe-inline';
X-Frame-Options: DENY
X-XSS-Protection: 0
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Access-Control-Allow-Headers: *
Access-Control-Allow-Methods: *
Content-Length: 0
Date: Fri, 23 May 2025 03:00:37 GMT
Connection: keep-alive

HTTP/1.1 302 Found
Location: /admin/login

HTTP/1.1 200 OK
Cache-Control: no-cache, no-store, must-revalidate, private, max-age=0
Expires: 0
Pragma: no-cache
Content-Security-Policy: default-src 'self' 'unsafe-inline';
X-Frame-Options: DENY
X-XSS-Protection: 0
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Content-Type: text/html; charset=utf-8
Date: Fri, 23 May 2025 03:00:37 GMT
Connection: close

What do you see on the browser when you use http://192.168.1.27/admin?

As a side note, the -v argument comes in handy if you want to diagnose HTTPS instead of HTTP:

$ curl -kILv https://10.0.0.7/admin
[..]
* Server certificate:
*  subject: CN=pi.hole
*  start date: Aug 12 01:57:10 2024 GMT
*  expire date: Aug 12 01:57:10 2054 GMT
*  issuer: CN=pi.hole; O=Pi-hole; C=DE
*  SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
[..]
HTTP/1.1 308 Permanent Redirect
< Location: /admin/
[..]
< HTTP/1.1 200 OK

-k for self signed certs.

That gave me:

curl -ILv http://192.168.1.27/admin/
*   Trying 192.168.1.27:80...
* Connected to 192.168.1.27 (192.168.1.27) port 80
> HEAD /admin/ HTTP/1.1
> Host: 192.168.1.27
> User-Agent: curl/8.7.1
> Accept: */*
> 
* Request completely sent off
< HTTP/1.1 302 Found
HTTP/1.1 302 Found
< Location: /admin/login
Location: /admin/login
< 

* Ignoring the response-body
* Connection #0 to host 192.168.1.27 left intact
* Issue another request to this URL: 'http://192.168.1.27/admin/login'
* Found bundle for host: 0x600003f84210 [serially]
* Can not multiplex, even if we wanted to
* Re-using existing connection with host 192.168.1.27
> HEAD /admin/login HTTP/1.1
> Host: 192.168.1.27
> User-Agent: curl/8.7.1
> Accept: */*
> 
* Request completely sent off
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Cache-Control: no-cache, no-store, must-revalidate, private, max-age=0
Cache-Control: no-cache, no-store, must-revalidate, private, max-age=0
< Expires: 0
Expires: 0
< Pragma: no-cache
Pragma: no-cache
< X-DNS-Prefetch-Control: off
X-DNS-Prefetch-Control: off
< Content-Security-Policy: default-src 'self' 'unsafe-inline';
Content-Security-Policy: default-src 'self' 'unsafe-inline';
< X-Frame-Options: DENY
X-Frame-Options: DENY
< X-XSS-Protection: 0
X-XSS-Protection: 0
< X-Content-Type-Options: nosniff
X-Content-Type-Options: nosniff
< Referrer-Policy: strict-origin-when-cross-origin
Referrer-Policy: strict-origin-when-cross-origin
< Content-Type: text/html; charset=utf-8
Content-Type: text/html; charset=utf-8
< Date: Fri, 23 May 2025 03:18:27 GMT
Date: Fri, 23 May 2025 03:18:27 GMT
< Connection: close
Connection: close
< 

That shows me:

curl -IL http://192.168.1.27/admin
HTTP/1.1 308 Permanent Redirect
Location: /admin/
Cache-Control: max-age=3600
X-DNS-Prefetch-Control: off
Content-Security-Policy: default-src 'self' 'unsafe-inline';
X-Frame-Options: DENY
X-XSS-Protection: 0
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Access-Control-Allow-Headers: *
Access-Control-Allow-Methods: *
Content-Length: 0
Date: Fri, 23 May 2025 03:25:59 GMT
Connection: keep-alive

HTTP/1.1 302 Found
Location: /admin/login

HTTP/1.1 200 OK
Cache-Control: no-cache, no-store, must-revalidate, private, max-age=0
Expires: 0
Pragma: no-cache
X-DNS-Prefetch-Control: off
Content-Security-Policy: default-src 'self' 'unsafe-inline';
X-Frame-Options: DENY
X-XSS-Protection: 0
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Content-Type: text/html; charset=utf-8
Date: Fri, 23 May 2025 03:25:59 GMT
Connection: close

This means the web interface is working.

What do you see on the browser when you use http://192.168.1.27/admin?

Ok, an update here. Oddly enough it worked on my android phone through Chrome. I was able to get to the admin page just fine. On my Macbook Pro, in Chrome, it still doesn't allow me to connect to the admin page.

Same IP range, no vlans are involved that would affect this. And reason the admin page wouldn't show in Chrome on the Macbook???

I think this is a MacOS setting causing issues.

I don't use Mac, so I don't remember exactly how it is called, but I remember other users had similar issues.

Try to find Privacy / Security, then "Local network" (or something similar) and enable it for Chrome. I hope this helps.

curl -v alone will not follow redirects. You'll get the 302 and then the session terminates.

Tell curl to follow redirects

In curl's tradition of only doing the basics unless you tell it differently, it does not follow HTTP redirects by default. Use the -L, --location option to tell it to do that.

When following redirects is enabled, curl follows up to 30 redirects by default. There is a maximum limit mostly to avoid the risk of getting caught in endless loops. If 30 is not sufficient for you, you can change the maximum number of redirects to follow with the --max-redirs option.

1 Like

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