Can't access admin page (running Pi-Hole on NextcloudPi)

Hello,

I'm running NextcloudPi on a RP4, and I wanted to install Pi-Hole.

It seems that everything is working, but not the admin page.

As my nextcloud is already running on port 80, I changed the port in the lighttpd.conf for 8080.

But when I want to reach the admin page (192.168.1.32:8080/admin), I have an error and I can't acces to it : page takes too long to response.

Someone have a tips to give me ?

Thanks !

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:

pihole -d

or do it through the Web interface:

Tools > Generate Debug Log

Hello,

I suppose it's the token : https://tricorder.pi-hole.net/7mBcxCsB/

I don't have acces to the Web interface (I called it admin page in the first message).

Thanks for your time,

As you already know, port 80 is already in use by Apache:

[✗] tcp:*:80 is in use by apache2 (https://docs.pi-hole.net/main/prerequisites/#ports)

You are not using port 8080... you set port 8888:

   server.port                 = 8888

Try http://192.168.1.32:8888/admin

1 Like

Oh yes, my bad, I made some test and I changed 8080 for 8888, but still, I can't access the web interface.

On another machine on the network (Linux, Mac or Windows) run the command:

curl --head http://192.168.1.32:8888/admin/login.php

You should get a response that looks like:

HTTP/1.1 200 OK
...
X-Pi-hole: The Pi-hole Web interface is working!
...
Server: lighttpd/1.4.59

If you get that then the Pi-hole web interface is working and the problem is your web browser, perhaps an extension or VPN or private browsing option which is interfering with your access.

Did you restart lighttpd service after the changes?

I got this in return :
curl --head http://192.168.1.32:8888/admin/login.php
curl: (7) Failed to connect to 192.168.1.32 port 8888: Connection refused

@rdwebdesign I restart the raspberry after each change in lighttpd.conf file.

Are there NextcloudPi security settings which are preventing clients from interacting with the Pi-hole server? Are you able to reach it with ping?

ping 192.168.1.32

Ping is ok. My nextcloud is working well. I already made work nextcloudpi + pihole before on another raspberry. And I don't get why I can't acces the web interface. I know Nextcloud interface is on the port 80, so I have to set another port for the pihole, but for some reason, I can't reach it :frowning:

Maybe you need to allow port 8888 on a firewall (if there's a firewall enabled).

pi@nextcloudpi:~ $ sudo ufw status
Status: inactive

I thought, one moment, that it will be the solution haha

From your RP4 command line, run these 2 commands:

curl --head http://192.168.1.32:8888

curl --head http://192.168.1.32:8888/admin/

If they connect, post the responses.

Here the outpout


pi@nextcloudpi:~ $ curl --head http://192.168.1.32:8888
HTTP/1.1 200 OK
Content-Type: text/html
Accept-Ranges: bytes
ETag: "4263847211"
Last-Modified: Tue, 16 Aug 2022 22:04:28 GMT
Content-Length: 10701
Date: Thu, 09 Nov 2023 22:50:08 GMT
Server: lighttpd/1.4.59
pi@nextcloudpi:~ $ curl --head http://192.168.1.32:8080/admin/
HTTP/1.1 302 Found
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: PHPSESSID=hi7s7tk5sdbun76mobiunnfimi; path=/; HttpOnly; SameSite=Strict
Location: login.php
Content-type: text/html; charset=UTF-8
X-Pi-hole: The Pi-hole Web interface is working!
X-Frame-Options: DENY
X-XSS-Protection: 0
X-Content-Type-Options: nosniff
Content-Security-Policy: default-src 'self' 'unsafe-inline';
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: same-origin
Date: Thu, 09 Nov 2023 22:51:50 GMT
Server: lighttpd/1.4.59

Note about your results:
You used port 8888 on the first command, but port 8080 on the second one...
This doesn't look like what I expected (maybe it's a typo?).

Did you use the same port on both commands?


If both commands used the same and correct port, they received the expected headers from lighttpd. This means the web interface can be accessed from your RP4. Looks like the issue is on your network.

Hello,

Yeah, just don't worry about the port. I'm back on port 8080 in lighttpd.conf. To avoid confusion with you, I replace 8080 by 8888 on forum. But I forget to replace it on the second command. At final, it becomes more confused :s
Both command worked on port 8080.

So the problem comes from my network ?

Currently, I use two RP4, one for nextcloudpi (192.168.1.32), where I'm trying to install pihole. And a second one on RaspiOS (192.168.1.19) where I have a pihole fully functional, web interface is ok and work on port 8080.

I can access the web interface from 192.168.1.19:8080/admin.

The thing is I want to merge nextcloudpi and the pihole, in order to free the second RP4.
So I want my pihole functional on nextcloudpi.

About my nextcloudpi, it is configured with a name domain, in order to access to my nextcloud when I'm not at home. It could come from this configuration ? Maybe Nextcloudpi doesn't allow connection from other port than 443 ?

I can't answer with 100% accuracy because I don't use Netxcloud and I don't know your apache config, but I doubt this domain name will interfere when you access the web site via IP.

I don't know why the web interface is accessible from you RP4, but not from other devices on the same network (you said there are no firewalls).

Is there any active firewall rules on your router?

Hello, anything up in Tomato (the firmware on my routeur).

I guess I will have to make an all fresh installation...

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