Webgui is not working after update to v6

Hi guys,

I have a Raspberry Pi with an Apache web server. Recently, I updated Pi-hole to version 6, and the web GUI stopped working. Before the update, everything worked fine. I was using Apache for Pi-hole as well.

Right after the update, my browser only browsed files instead of showing the web GUI. The problem was due to inactive Lua mode. After activating it, the web GUI returned a Internal Server Error.

Can anyone help me with this issue?

RaspberryPi 4b
Raspbian GNU/Linux 12

000-default.conf:

<Files "*.lp">
SetHandler lua-script
AddHandler lua-script .lp
</Files>
<IfModule mod_dir.c>
DirectoryIndex index.html index.php index.lp
</IfModule>

error.log
[Sun Feb 23 07:50:23.834170 2025] [lua:error] [pid 26931:tid 26931] AH01482: Error loading /var/www/html/admin/index.lp: @/var/www/html/admin/index.lp

[Sun Feb 23 07:50:25.118849 2025] [lua:error] [pid 26932:tid 26932] AH01482: Error loading /var/www/html/admin/index.lp: @/var/www/html/admin/index.lp

[Sun Feb 23 07:52:32.530875 2025] [lua:error] [pid 26934:tid 26934] AH01482: Error loading /var/www/html/admin/index.lp: @/var/www/html/admin/index.lp

[Sun Feb 23 08:24:42.485803 2025] [lua:error] [pid 26931:tid 26931] AH01482: Error loading /var/www/html/admin/index.lp: @/var/www/html/admin/index.lp

[Sun Feb 23 08:24:43.559603 2025] [lua:error] [pid 26932:tid 26932] AH01482: Error loading /var/www/html/admin/index.lp: @/var/www/html/admin/index.lp

[Sun Feb 23 08:24:55.877485 2025] [lua:error] [pid 27053:tid 27053] AH01482: Error loading /var/www/html/admin/index.lp: @/var/www/html/admin/index.lp

[Sun Feb 23 08:29:09.544691 2025] [lua:error] [pid 26934:tid 26934] AH01482: Error loading /var/www/html/admin/index.lp: @/var/www/html/admin/index.lp

[Sun Feb 23 08:29:11.165141 2025] [lua:error] [pid 26935:tid 26935] AH01482: Error loading /var/www/html/admin/index.lp: @/var/www/html/admin/index.lp

[Sun Feb 23 08:34:13.149158 2025] [lua:error] [pid 26932:tid 26932] AH01482: Error loading /var/www/html/admin/index.lp: @/var/www/html/admin/index.lp

[Sun Feb 23 08:57:05.997852 2025] [lua:error] [pid 26933:tid 26933] AH01482: Error loading /var/www/html/admin/index.lp: @/var/www/html/admin/index.lp

[Sun Feb 23 08:57:06.917346 2025] [lua:error] [pid 26934:tid 26934] AH01482: Error loading /var/www/html/admin/index.lp: @/var/www/html/admin/index.lp

[Sun Feb 23 09:05:03.456133 2025] [mpm_prefork:notice] [pid 26930:tid 26930] AH00170: caught SIGWINCH, shutting down gracefully

[Sun Feb 23 09:05:03.827736 2025] [mpm_prefork:notice] [pid 12370:tid 12370] AH00163: Apache/2.4.62 (Raspbian) configured -- resuming normal operations

Actual Behaviour:

Internal Server Error

Debug Token:

https://tricorder.pi-hole.net/iUM3LOMn/

You are trying to use apache to run Pi-hole web interface, but Pi-hole v6 uses Lua pages and these pages need pihole-FTL as web server.

Also, Pi-hole web server is trying to use the same port as apache.

Suggestion:

Set Pi-hole port to something else, like 8080 running this command: pihole-FTL --config webserver.port '8080,[::]:8080,443s,[::]:443s' and then restart FTL with sudo systemctl restart pihole-FTL.service.

Using this configuration you will be able to access Pi-hole web inteface using port :8080 without conflicts with apache.

2 Likes

Thanks. I tried changing the port to 8080 with little progress. Finally, the browser is no longer browsing files but now shows a 404 error at the address :8080/admin.

Any idea what could be wrong?

https://tricorder.pi-hole.net/iDo800xo/

What happens if you try http://10.1.1.3:8080/admin?
Did you try https - https://10.1.1.3:8443/admin?

Note:
you can safely use 443 (instead of 8443) for https because there is no other server using this port.

1 Like

What happens if you try http://10.1.1.3:8080/admin?

The URL changed to http://10.1.1.3:8080/admin/login, and the webpage is black with a 404 error message.
Snímek obrazovky 2025-02-23 v 19.15.42

Did you try https - https://10.1.1.3:8443/admin?
Yes, I tried. Same result.

I just upgraded my backup PiHole Core to 6.0.4, and then I could not access the web gui. The upgrade changed the port to 8080. It is weird that the GUI page shows the default as different:

If you didn't disable lighttpd before the upgrade, Pi-hole couldn't use port 80 (it was in use by lighttpd). In this case, the installer uses the alternative port 8080.

I just upgraded the core version from 6.0.x to 6.0.4, the Web and FTL kept already in their last version, 6.0.1 and 6.0.2, respectively. Just after the upgrade, the web server stopped working and seems that there's no service on port 80 (in fact, I uninstalled lighttpd after upgrading Pihole to v6). Now Pihole is listening on ports 8080 and 8430:

sudo ss -tulnp | grep :80
tcp   LISTEN 0      200          0.0.0.0:8080       0.0.0.0:*    users:(("pihole-FTL",pid=692,fd=34))  
tcp   LISTEN 0      200             [::]:8080          [::]:*    users:(("pihole-FTL",pid=692,fd=36))
sudo netstat -tulnp | grep :80
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      692/pihole-FTL      
tcp6       0      0 :::8080                 :::*                    LISTEN      692/pihole-FTL

By the way, out of curiosity, why Pihole now uses its own web server? Why to reinvent the wheel when there's lighttpd and php? :slightly_smiling_face:

That's exactly the reason. There were these 2 dependencies. In many cases, this caused issues.

Each supported OS had a different PHP and lighttpd versions. Pi-hole doesn't need many web server functions and just basic PHP functions were used, but with Operating Systems using PHP versions from 7.1 up to 8.2 we would need to update code just to avoid PHP warnings. Also, there were a few recent security issues identified (none of them would exist without PHP).

It was disabled

sudo systemctl status lighttpd.service
● lighttpd.service
     Loaded: masked (Reason: Unit lighttpd.service is masked.)
     Active: inactive (dead)

I have tried running Pi-hole in Docker on port 8080, and everything seems fine. However, the local installation with the existing Apache server, even with changed ports, shows a 404 error.

Thanks. This solution worked for me.

A post was split to a new topic: Can't login with web UI on port 8080

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