I updated my pi-hole to version 6. Everything works fine, except the admin interface. I get a 404 - not found - for http://pi-hole-ip/admin/.
I do not use the old webserver, but the new integrated one, I double checked that.
In webserver.log with added debugging I can see the requests:
[2025-02-19 19:15:31.810 CET 3061976] DEBUG: REQUEST: GET /admin/ (src/webserver/civetweb/civetweb.c:15151)
[2025-02-19 19:15:31.810 CET 3061976] DEBUG: Error 404 - [Not found] (src/webserver/civetweb/civetweb.c:4532)
[2025-02-19 19:15:31.810 CET 3061976] DEBUG: Check error page /var/www/html/admin/error404.html - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-19 19:15:31.810 CET 3061976] DEBUG: Check error page /var/www/html/admin/error404.htm - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-19 19:15:31.811 CET 3061976] DEBUG: Check error page /var/www/html/admin/error404.lp - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-19 19:15:31.811 CET 3061976] DEBUG: Check error page /var/www/html/admin/error4xx.html - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-19 19:15:31.811 CET 3061976] DEBUG: Check error page /var/www/html/admin/error4xx.htm - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-19 19:15:31.811 CET 3061976] DEBUG: Check error page /var/www/html/admin/error4xx.lp - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-19 19:15:31.811 CET 3061976] DEBUG: Check error page /var/www/html/admin/error.html - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-19 19:15:31.812 CET 3061976] DEBUG: Check error page /var/www/html/admin/error.htm - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-19 19:15:31.812 CET 3061976] DEBUG: Check error page /var/www/html/admin/error.lp - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-19 19:15:31.812 CET 3061976] DEBUG: handling GET request to /var/www/html/admin/: file not found (src/webserver/civetweb/civetweb.c:15612)
[2025-02-19 19:15:31.812 CET 3061976] DEBUG: handle_request done (src/webserver/civetweb/civetweb.c:6845)
[2025-02-19 19:15:31.813 CET 3061976] DEBUG: Done processing connection from 192.168.2.225 (0.000000 sec) (src/webserver/civetweb/civetweb.c:20041)
It tells me, the files cannot be found, but the files are there - even under the mentioned path, e.g. "/var/www/html/admin/".
This is the listing for "admin" in /var/www/html/
drwxr-xr-x 9 pihole www-data 4096 19. Feb 16:13 admin
Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:
Yes, I use http on port 8081, because other ports are in use already by other services. That should not be a problem as I understand.
I don't care for the https port, so it's ok. This is defined as an optional port in the config - therefore this should not be a problem either.
Here's the dir listing:
root@homeserver:/var/www/html/admin# ls -la
insgesamt 592
drwxr-xr-x 9 pihole www-data 4096 19. Feb 16:13 .
drwxr-x--- 4 www-data www-data 4096 8. Feb 19:46 ..
-rw-r--r-- 1 pihole www-data 17 19. Feb 16:13 .codespellignore
-rw-r--r-- 1 pihole www-data 2348 19. Feb 16:13 CONTRIBUTING.md
drwxr-xr-x 2 pihole www-data 4096 19. Feb 16:13 .devcontainer
-rw-r--r-- 1 pihole www-data 571 19. Feb 16:13 .editorconfig
-rw-r--r-- 1 pihole www-data 1026 19. Feb 16:13 error403.lp
-rw-r--r-- 1 pihole www-data 969 19. Feb 16:13 error404.lp
drwxr-xr-x 8 pihole www-data 4096 19. Feb 16:13 .git
-rw-r--r-- 1 pihole www-data 12 19. Feb 16:13 .gitattributes
drwxr-xr-x 3 pihole www-data 4096 19. Feb 16:13 .github
-rw-r--r-- 1 pihole www-data 154 19. Feb 16:13 .gitignore
-rw-r--r-- 1 pihole www-data 1323 19. Feb 16:13 gravity.lp
-rw-r--r-- 1 pihole www-data 4964 19. Feb 16:13 groups-clients.lp
-rw-r--r-- 1 pihole www-data 8860 19. Feb 16:13 groups-domains.lp
-rw-r--r-- 1 pihole www-data 4562 19. Feb 16:13 groups-lists.lp
-rw-r--r-- 1 pihole www-data 3324 19. Feb 16:13 groups.lp
drwxr-xr-x 3 pihole www-data 4096 19. Feb 16:13 img
-rw-r--r-- 1 pihole www-data 10889 19. Feb 16:13 index.lp
-rw-r--r-- 1 pihole www-data 1129 19. Feb 16:13 interfaces.lp
-rw-r--r-- 1 pihole www-data 14136 19. Feb 16:13 LICENSE
-rw-r--r-- 1 pihole www-data 7937 19. Feb 16:13 login.lp
-rw-r--r-- 1 pihole www-data 1580 19. Feb 16:13 messages.lp
-rw-r--r-- 1 pihole www-data 2851 19. Feb 16:13 network.lp
-rw-r--r-- 1 pihole www-data 3997 19. Feb 16:13 package.json
-rw-r--r-- 1 pihole www-data 306744 19. Feb 16:13 package-lock.json
-rw-r--r-- 1 pihole www-data 9835 19. Feb 16:13 queries.lp
-rw-r--r-- 1 pihole www-data 10188 19. Feb 16:13 README.md
drwxr-xr-x 4 pihole www-data 4096 19. Feb 15:42 scripts
-rw-r--r-- 1 pihole www-data 2212 19. Feb 16:13 search.lp
-rw-r--r-- 1 pihole www-data 1471 19. Feb 16:13 settings-all.lp
-rw-r--r-- 1 pihole www-data 15226 19. Feb 16:13 settings-api.lp
-rw-r--r-- 1 pihole www-data 20522 19. Feb 16:13 settings-dhcp.lp
-rw-r--r-- 1 pihole www-data 17806 19. Feb 16:13 settings-dns.lp
-rw-r--r-- 1 pihole www-data 7129 19. Feb 16:13 settings-dnsrecords.lp
-rw-r--r-- 1 pihole www-data 7230 19. Feb 16:13 settings-privacy.lp
-rw-r--r-- 1 pihole www-data 18639 19. Feb 16:13 settings-system.lp
-rw-r--r-- 1 pihole www-data 6617 19. Feb 16:13 settings-teleporter.lp
drwxr-xr-x 3 pihole www-data 4096 19. Feb 16:13 style
-rw-r--r-- 1 pihole www-data 1448 19. Feb 16:13 taillog.lp
drwxr-xr-x 29 pihole www-data 4096 19. Feb 16:13 vendor
A little more context on the permissions of that dir:
Previously the dir (and its files) had ownership root:root. Because of the problem in this thread I changed it to pihole:www-data (after also trying www-data:www-data). That didn't do the trick.
Just now I tried pihole -up, which gave the error, that the admin interface web files were missing (which they clearly are not).
I changed the owner back to root:root and now pihole -up worked flawlessly again.
Unfortunately the original problem still exists. I get 404 when opening the admin interface in browser.
But it can't have a conflict with another service running on your system
I am guessing you use 8443 for the UniFi Controller so you really need to disable that port in the Pi-Hole configuration in order for the Pi-Hole webGUI to start properly !!
Okay, changed it and removed 8443 (although it is marked with "o" as optional), restarted FTL service.
Didn't change a thing - as I expected. I double checked the web server.log if the port change did apply:
[2025-02-20 15:01:45.006 CET 3155949] Initializing HTTP server on ports "8081,[::]:8081"
[2025-02-20 15:01:45.007 CET 3155949] DEBUG: [document_root] -> [/var/www/html] (src/webserver/civetweb/civetweb.c:21329)
[2025-02-20 15:01:45.007 CET 3155949] DEBUG: [error_pages] -> [/var/www/html/admin/] (src/webserver/civetweb/civetweb.c:21329)
[2025-02-20 15:01:45.007 CET 3155949] DEBUG: [listening_ports] -> [8081,[::]:8081] (src/webserver/civetweb/civetweb.c:21329)
[2025-02-20 15:01:45.007 CET 3155949] DEBUG: [decode_url] -> [yes] (src/webserver/civetweb/civetweb.c:21329)
[2025-02-20 15:01:45.007 CET 3155949] DEBUG: [enable_directory_listing] -> [no] (src/webserver/civetweb/civetweb.c:21329)
...
still getting exactly the same errors in browser and therefore in web server.log:
[2025-02-20 15:01:56.024 CET 3155949] DEBUG: REQUEST: GET /admin/ (src/webserver/civetweb/civetweb.c:15151)
[2025-02-20 15:01:56.025 CET 3155949] DEBUG: Error 404 - [Not found] (src/webserver/civetweb/civetweb.c:4532)
[2025-02-20 15:01:56.025 CET 3155949] DEBUG: Check error page /var/www/html/admin/error404.html - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-20 15:01:56.025 CET 3155949] DEBUG: Check error page /var/www/html/admin/error404.htm - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-20 15:01:56.025 CET 3155949] DEBUG: Check error page /var/www/html/admin/error404.lp - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-20 15:01:56.025 CET 3155949] DEBUG: Check error page /var/www/html/admin/error4xx.html - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-20 15:01:56.025 CET 3155949] DEBUG: Check error page /var/www/html/admin/error4xx.htm - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-20 15:01:56.025 CET 3155949] DEBUG: Check error page /var/www/html/admin/error4xx.lp - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-20 15:01:56.025 CET 3155949] DEBUG: Check error page /var/www/html/admin/error.html - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-20 15:01:56.025 CET 3155949] DEBUG: Check error page /var/www/html/admin/error.htm - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-20 15:01:56.026 CET 3155949] DEBUG: Check error page /var/www/html/admin/error.lp - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-20 15:01:56.027 CET 3155949] DEBUG: handling GET request to /var/www/html/admin/: file not found (src/webserver/civetweb/civetweb.c:15612)
[2025-02-20 15:01:56.027 CET 3155949] DEBUG: handle_request done (src/webserver/civetweb/civetweb.c:6845)
[2025-02-20 15:01:56.027 CET 3155949] DEBUG: Done processing connection from 192.168.2.50 (0.000000 sec) (src/webserver/civetweb/civetweb.c:20041)
[2025-02-20 19:53:37.585 CET 3498] DEBUG: Incoming connection from 192.168.2.226 (src/webserver/civetweb/civetweb.c:20329)
[2025-02-20 19:53:37.585 CET 3498] DEBUG: Start processing connection from 192.168.2.226 (src/webserver/civetweb/civetweb.c:19879)
[2025-02-20 19:53:37.585 CET 3498] DEBUG: calling get_request (1 times for this connection) (src/webserver/civetweb/civetweb.c:19885)
[2025-02-20 19:53:37.585 CET 3498] DEBUG: HTTP Host: 192.168.3.2 (src/webserver/civetweb/civetweb.c:14580)
[2025-02-20 19:53:37.585 CET 3498] DEBUG: http: 1.1, error: none (src/webserver/civetweb/civetweb.c:19969)
[2025-02-20 19:53:37.585 CET 3498] DEBUG: REQUEST: GET /admin/login (src/webserver/civetweb/civetweb.c:15151)
[2025-02-20 19:53:37.585 CET 3498] DEBUG: Error 404 - [Not found] (src/webserver/civetweb/civetweb.c:4532)
[2025-02-20 19:53:37.585 CET 3498] DEBUG: Check error page /var/www/html//admin/error404.html - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-20 19:53:37.585 CET 3498] DEBUG: Check error page /var/www/html//admin/error404.htm - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-20 19:53:37.585 CET 3498] DEBUG: Check error page /var/www/html//admin/error404.lp - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-20 19:53:37.585 CET 3498] DEBUG: Check error page /var/www/html//admin/error4xx.html - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-20 19:53:37.585 CET 3498] DEBUG: Check error page /var/www/html//admin/error4xx.htm - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-20 19:53:37.585 CET 3498] DEBUG: Check error page /var/www/html//admin/error4xx.lp - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-20 19:53:37.585 CET 3498] DEBUG: Check error page /var/www/html//admin/error.html - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-20 19:53:37.585 CET 3498] DEBUG: Check error page /var/www/html//admin/error.htm - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-20 19:53:37.585 CET 3498] DEBUG: Check error page /var/www/html//admin/error.lp - not found (src/webserver/civetweb/civetweb.c:4632)
[2025-02-20 19:53:37.586 CET 3498] DEBUG: handling GET request to /var/www/html//admin/login: file not found (src/webserver/civetweb/civetweb.c:15612)
[2025-02-20 19:53:37.586 CET 3498] DEBUG: handle_request done (src/webserver/civetweb/civetweb.c:6845)
[2025-02-20 19:53:37.586 CET 3498] DEBUG: Accepted socket 43 (src/webserver/civetweb/civetweb.c:20526)
[2025-02-20 19:53:37.586 CET 3498] DEBUG: Done processing connection from 192.168.2.226 (0.000000 sec) (src/webserver/civetweb/civetweb.c:20041)
Yes it is the answer of the Pi-hole Webserver. I did use the correct port and yes, I do see the requests in the Webserver.log (as can be seen in my previous posts).
Also, in the logs provided you can see that port 8081 is served by the pihole process.
It tries to serve the admin dir, cannot find it, tries to serve the 404 error page, but cannot find it either - and therefore seemingly shows this plain and simple response.
Inside containers and in my testing server they are owned by root (root:root).
To be honest, var/www is owned by root, var/www/html is owned by www-data(probably because it was initially used by lighttpd) and all sub-directories are owned by root, but this is not necessary... root is correct.