Baikal doesn't work (needs a change in lighttpd.conf)

Let me start by thanking the devs for this great project. I installed Pi Hole with the LLSP webstack and it worked fine.

Then today after updating to version 7 I tried to install Baikal which to my surprise installed LLMP and MariaDB.
If Baikal could be configured to just use the previously installed SQlite that would be nice.

But my main problem is that I wasn’t presented with any configuration prompt after the install.
I couldn’t open the webpage as described in the documentation either: https://dietpi.com/docs/software/social/#baikal
Meaning: neither “http://<your.IP>/baikal/html/admin” nor “http://<your.IP>/baikal/html” work, instead I get the following message:
“Pi-hole: Your black hole for Internet advertisements. Did you mean to go to the admin panel?”

I looked into /etc/lighttpd/lighttpd.conf and have noticed that the root is:
server.document-root = “/var/www/html”

Within this root there are PiHole files, but no Baikal ones. Unfortunately Baikal was installed in “/var/www/baikal” instead.
Could it be that installing Baikal didn’t adapt the lighttpd.conf at all?

I changed the root in lighttpd.conf to “/var/www” and then entered “sudo dietpi-services restart”, now at least the website can be opened under “http://<your.IP>/baikal/html/admin”

I don’t know if me doing so breaks other things, but for now it seems both PiHole and BaiKal do their job.
In the web configuration it seems as if Baikal uses SQlite, if so, why is MariaDB needed?

Hi,

If you install Pihole using dietpi-software, web server root will be set to /var/www/ as default configuration. In your case it seems DietPi default configuration was overwritten. Usually this happen if you use Pihole repair functions. There are 2 options. If you choose wrong option, your config will be overwritten. Unfortunately this is a behaviour of Pihole themselves as Pihole assume to be the only web server stack on the system :roll_eyes:

Did you used Pihole repair in the past?

Thanks for the quick reply. I set up DietPi not long ago and to my knowledge I never used any repair functions of PiHole. I installed PiHole via dietpi-software (admittedly I had some problems at first, but they were because of the IP not being static etc.). IIRC I only reinstalled PiHole after already installing Baikal and seeing that the latter didn’t work. As the first reinstall of PiHole happened after the problem (iirc), it couldn’t have been the cause, could it? Or do you mean something else by repair functions?

Btw, Baikal too was installed and then reinstalled via dietpi-software by me. I also didn’t change anything outside of dietpi-config options except for manually adding a line in /etc/pihole/pihole-FTL.conf (MAXDBDAYS=0) and deleting the file /etc/pihole/pihole-FTL.db

It works fine now after changing the root, so if it’s just me who somehow got his PiHole wrongly repaired without remembering and it works fine for other out of the box, consider this problem resolved. Thanks again for taking the time.

Just one more thing: As the admin panel of Baikal is telling me that it indeed uses SQlite, is it safe to uninstall MariaDB (that was installed with Baikal), or is it not?

PiHole repair is a Pihole onw functionality that could be triggered by running pihole -r. This will give the possibility to reconfigure or repair Pi-hole subsystems. Running Repair will be fine. However if you would select Reconfigure, your entire installation would be overwritten by PiHole own settings not fitting into DietPi environment.

I did a test installation of PiHole and following was set explicitly by DietPi

 DietPi-Software
─────────────────────────────────────────────────────
 Mode: Configuring Lighttpd: webserver

[  OK  ] DietPi-Software | Setting in /etc/lighttpd/lighttpd.conf adjusted: server.document-root = "/var/www"
[  OK  ] DietPi-Software | rmdir --ignore-fail-on-non-empty /var/www/html
[  OK  ] DietPi-Software | sed -i s/create-mime\.assign\.pl/create-mime.conf.pl/g /etc/lighttpd/lighttpd.conf
[  OK  ] DietPi-Software | lighty-enable-mod fastcgi fastcgi-php

This fit’s the setting once system was restarted

root@DietPi3:~# cat /etc/lighttpd/lighttpd.conf | grep server.document-root
server.document-root = "/var/www"
root@DietPi3:~#

Not sure how your system ends up with the incorrect web server root

Regarding Baikal, well there was a need to make a decision for a database. Not sure why MariaDB was selected but this was done quite in past. If you configured Baikal to use SQLite, it’s fine as well. You could simply stop MariaDB and check if Baikal is still running. However, DietPi will try to reinstall MariaDB every time you are running dietpi-software reinstall 57 to update Baikal installation

pihole -r + Reconfigure can be used, but it is important then, when being asked whether to install Lighttpd or not, to select No, to not have the lighttpd.conf reset.

See in our docs “Repairing Pi-hole”: https://dietpi.com/docs/software/dns_servers/#pi-hole

the thing is, for me this is hidden inside the reconfiguration process. If you are nor reading with care, you simple hit ENTER > ENTER > ENTER as it is selected as recommendation by default :roll_eyes:

But notching we can change, and need to accept

Man this is the best software project I’ve ever seen, the support is great, thank you a lot. I was able to stop and thereafter delete MariaDB and also LLMP in dietpi-software (because I already had LLSP) with no problems. I set the topic as solved, since changing the root fixed it for me. You’re right, I must have entered “pihole -r” before without taking care. Now I know. Again thank you both!