Raspi pi-hole admin just shows webserver default page

I've installed pi-hole on raspberry pie before without issue but this time the admin page doesn't exists, I just get a default page from the webserver.

I Use my raspberry pi to provide an intranet using Apache2 and I use pi-hole to block adds. In the past I've installed Apache2 first and then moved it's service folder from /var/www/html to a new folder /var/www/intranet. This still works on a build I've done this afternoon.

Then I've installed pi-hole and simply changed the port from port 80 to port 8023. In the past this has worked fine with my intranet on port 80 and the pi-hole admin on 8023.

This time it hasn't worked, the pi-hole admin just shows the default apache2 loading page and lighttpd is complaining it has failed to start.

The only thing I've changed since installing pi-hole is the port number change from 80 to 8023. I then noticed that this should be in the /etc/lighttpd/external.conf and I've added the change there too.

I thought I had all this worked out a couple of years ago. Seems things have changed and i'm back in the dark.

Anyone got any advice.?

Thank you.

Bob.

Please upload a debug log and post just the token 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

wow, thanks for the speedy reply.

I think I've done as you asked, I have a token..
https://tricorder.pi-hole.net/kmCNo4dO/

Not certain about the 0s and Os if I'm honest. may have them wrong.

Thanks for the help.

Bob.

That's the correct token.

As you noted, you have Apache running and this is interfering with lighttpd.

[80] is in use by apache2 (Prerequisites - Pi-hole documentation)

lighttpd is configured on your desired port in the lighttpd config file

server.port = 8023

A more reliable and persistent way to move lighttpd to an alternate port appears here:

https://discourse.pi-hole.net/t/lighttpd-daemon-wont-start/44985/13

I recall that this duplicated configuration line will cause problems. The server.port := line in the external conf file will alleviate this conflict.

Thanks for the help.
I emtied everything out of the external.conf file and re-booted. It works!!
Thank you.

I'm a bit confused though. Clearly it doesn't like having the port set in two places, I get that but which place should I use? If I don't use the external.conf then I run the risk of being overwritten but it works.

If I put it in the extenal file do I remove the entry from the main file, or rem it out or something?

Is there any significance in the : as in server.port := 8023 or is that just a typo?

Brilliant help tonight thank you so much.

Cheers,

Bob.

It is not a typo. With the later version of lighttpd, you can use the := sign and this now becomes a different server port command which will not conflict with the lighttpd conf file.

I recommend using this line in the external.conf file. It will be persistent and won't be overwritten on a Pi-hole repair or update (but the lighttpd conf file will be reverted to the shipped configuration).

1 Like

Brilliant. Right I'll give that a shot then. I understand now that you told me to do that in the first place but I didn't quite grasp what you were saying.
Thanks ever so much, you've been very helpful and a star.

Cheers,

Bob.

1 Like

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