Bullseye update fine but lighttpd is failing Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
User avatar
Joulinar
Posts: 6525
Joined: Sat Nov 16, 2019 12:49 am

Re: Bullseye update fine but lighttpd is failing

Post by Joulinar »

there you have the duplicate configuration for port 443 as it is defined in

Code: Select all

/etc/lighttpd/conf-enabled/10-ssl.conf
/etc/lighttpd/conf-available/50-dietpi-https.conf
10-ssl.conf is a dummy configuration and it seems it got activate during update. I would recommend to remove

Code: Select all

rm /etc/lighttpd/conf-enabled/10-ssl.conf
and check config again

Code: Select all

/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
mcnahum
Posts: 32
Joined: Mon Oct 19, 2020 7:25 pm

Re: Bullseye update fine but lighttpd is failing

Post by mcnahum »

I think that we are progressing there...

Code: Select all

root@DietPi:/mnt/RPiBackup/tst# rm /etc/lighttpd/conf-enabled/10-ssl.conf
root@DietPi:/mnt/RPiBackup/tst#  /usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf 
2021-11-11 14:43:58: configfile.c.461) Warning: "mod_compress" is DEPRECATED and has been replaced with "mod_deflate".  A future release of lighttpd 1.4.x will not contain mod_compress and lighttpd may fail to start up
2021-11-11 14:43:58: plugin.c.195) dlopen() failed for: /usr/lib/lighttpd/mod_deflate.so /usr/lib/lighttpd/mod_deflate.so: cannot open shared object file: No such file or directory
2021-11-11 14:43:58: server.c.1238) loading plugins finally failed
User avatar
Joulinar
Posts: 6525
Joined: Sat Nov 16, 2019 12:49 am

Re: Bullseye update fine but lighttpd is failing

Post by Joulinar »

did you reinstall lighttpd after Bullseye upgrade? Usually our install will correct this on reinstall automatically.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
mcnahum
Posts: 32
Joined: Mon Oct 19, 2020 7:25 pm

Re: Bullseye update fine but lighttpd is failing

Post by mcnahum »

no I didn't, I did multiple pihole -r / pihole -a ... but I didn't touched lighttps as it's coming with dietpi ...

any idea how to fix it?
User avatar
Joulinar
Posts: 6525
Joined: Sat Nov 16, 2019 12:49 am

Re: Bullseye update fine but lighttpd is failing

Post by Joulinar »

try following

Code: Select all

sed -Ei '/^compress\..*=[[:blank:]]*["(].*[")]$/d' /etc/lighttpd/lighttpd.conf
sed -i '/^[[:blank:]]*"mod_compress",$/d' /etc/lighttpd/lighttpd.conf
and check config again

Code: Select all

/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
mcnahum
Posts: 32
Joined: Mon Oct 19, 2020 7:25 pm

Re: Bullseye update fine but lighttpd is failing

Post by mcnahum »

we are almost there:

root@DietPi:/mnt/RPiBackup/tst# /usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf
2021-11-11 15:14:10: configfile.c.1142) WARNING: unknown config-key: setenv.add-environment (ignored)
2021-11-11 15:14:10: configfile.c.1142) WARNING: unknown config-key: setenv.add-environment (ignored)

So I started lighttps and .. yes it's active

The only issue now is going to https://pi-hole.mysite.net/admin/ give me a 404 Not Found instead of the Pihole web interface
User avatar
MichaIng
Site Admin
Posts: 3534
Joined: Sat Nov 18, 2017 6:21 pm

Re: Bullseye update fine but lighttpd is failing

Post by MichaIng »

That lighttpd.conf isn't the one from the Pi-hole installer but ours.

Actually we do a wrong migration in dietpi-software as we enable this 10-ssl.conf while dietpi-letsencrypt doesn't do it but includes these directives with the final/correct values. Here is the fix: https://github.com/MichaIng/DietPi/comm ... 822e44080c

Other migration steps are fine and still missing in your case:

Code: Select all

apt install lighttpd-mod-deflate
sed -Ei '/^compress\..*=[[:blank:]]*["(].*[")]$/d' /etc/lighttpd/lighttpd.conf
sed -i '/^[[:blank:]]*"mod_compress",$/d' /etc/lighttpd/lighttpd.conf
lighty-enable-mod deflate
User avatar
MichaIng
Site Admin
Posts: 3534
Joined: Sat Nov 18, 2017 6:21 pm

Re: Bullseye update fine but lighttpd is failing

Post by MichaIng »

Ah setenv.add-environment is deprecated. I didn't know that. Something to fix in dietpi-letsencrypt to assure that the HTTPS variable is still set. However it should not break anything. What the hack, no hint about this in the official docs :?: https://redmine.lighttpd.net/projects/l ... _ModSetEnv
User avatar
Joulinar
Posts: 6525
Joined: Sat Nov 16, 2019 12:49 am

Re: Bullseye update fine but lighttpd is failing

Post by Joulinar »

@MichaIng
I have seen the code line as well and was already going to ask about. Good you changed it already.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3534
Joined: Sat Nov 18, 2017 6:21 pm

Re: Bullseye update fine but lighttpd is failing

Post by MichaIng »

About the setenv warning, logs misinterpreted by me. The module is not loaded, fix it via:

Code: Select all

G_CONFIG_INJECT '"mod_setenv"' '	"mod_setenv",' /etc/lighttpd/lighttpd.conf '"mod_.+",'
systemctl restart lighttpd
This is already done in dietpi-letsencrypt, so probably copy&pasting configs in attempt to solve things removed it, e.g. if the user from the Pi-hole forum didn't have HTTPS enabled ;).
Post Reply