0
guidol

tutorial [Info] Pihole-lighttpd issue with debian buster

Recommended Posts

Yesterday i did install Armbian_5.86_Aml-s905_Debian_buster_default_5.1.0_20190514.img from @balbes150
on my Sunvell T95KPro (S912).

 

While installing Pihole the Installation does break when trying to start lighttpd.

After checking with journalctl -u lighttpd  it turns out that the file /usr/share/lighttpd/create-mime.assign.pl 

is missing, because in the newer lighttpd-version of debian buster the file has be renamed

to /usr/share/lighttpd/create-mime.conf.pl 

(see also https://discourse.pi-hole.net/t/lighttpd-does-not-start/6207/11 )

 

Pihole doesnt know/use the new name with debian buster, so it fails to start the lighttpd :(

 

So I did find 2 ways to resolve the problem.

 

First (quick and dirty?) way:

cp /usr/share/lighttpd/create-mime.conf.pl /usr/share/lighttpd/create-mime.assign.pl 
or
ln -s /usr/share/lighttpd/create-mime.conf.pl /usr/share/lighttpd/create-mime.assign.pl


read also:
Pihole breaks lighttpd on Debian Buster #2557

https://github.com/pi-hole/pi-hole/issues/2557

 

the second way (found it at https://forum.kuketz-blog.de/viewtopic.php?t=3067 ) is to edit /etc/lighttpd/lighttpd.conf 

and search for the 2 following lines and comment them out (found the 2nd one at the end of the file):
 

#include_shell "/usr/share/lighttpd/create-mime.assign.pl"
#include_shell "cat external.conf 2>/dev/null"

and add the follwoing line to the file:

include_shell "/usr/share/lighttpd/create-mime.conf.pl"

After saving the file you should be able to restart lighttpd via

sudo /etc/init.d/lighttpd restart
or
sudo service lighttpd restart

or
sudo service lighttpd stop
sudo service lighttpd start

 

BUT second way does not work good with updating or repair-install of pihole, because I think this will set the config-file to the old state :(

(also for server.error-handler-404)


So maybe the first way will work better while pihole doenst know the new file-name - or you also can do both ways :)

 

BTW: If you are experience a 400 Bad Request while  only using the IP for getting to the Pihole-Webpage
(and the redirect should ask you if you want to use the /admin page - but it doenst)

then try the follwing small resolution - edit a line in the file /etc/lighttpd/lighttpd.conf

from:
server.error-handler-404    = "pihole/index.php"

to:
server.error-handler-404    = "/pihole/index.php"

 

 

lighttpd.conf

Share this post


Link to post
Share on other sites
(edited)
On 6/19/2019 at 6:54 AM, renedis said:

There is a new update from PiHole that should fix this issue.

 

Although it (v.4.3.1) has been cited as fixing this issue I am still getting this error after a clean install 4.3.1. Strange.

Edited by Dan M

Share this post


Link to post
Share on other sites
On 7/2/2019 at 12:49 PM, Dan M said:

Although it (v.4.3.1) has been cited as fixing this issue I am still getting this error after a clean install 4.3.1. Strange.

Today I gave buster a new try with pihole on my T95K Pro S912 TVBox.

I compiled a actual version of debian buster for it (thanks to @balbes150): 

Debian Buster with Armbian Linux 5.3.0-rc1-next-20190726-aml-s912
package bsp-kernel[5.91] dtb[5.91] firmware[5.91] config[5.91]

and started the pihole install via: curl -sSL https://install.pi-hole.net | bash

 

The installation didnt broke like before with debian buster (no problem with lighttpd).

 

In the middle of the installation I did get the following error-message between the installation-messages:
 

  [i] Backing up /etc/dnsmasq.conf to /etc/dnsmasq.conf.old

iptables/1.8.2 Failed to initialize nft: Protocol not supported
iptables/1.8.2 Failed to initialize nft: Protocol not supported

Installation went fine, but I did search for the error and found the following page:
https://gist.github.com/nickfox-taterli/fcddd0ac724ec066b51f8e777800fea2

 

The is listed that buster has as default now nftables and not xtables.

 

The problem can be fixed with the following commands:

sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy

This will set some new symbolic links ( to other symbolic links :) ) :

ls -l /etc/alternatives/iptables
lrwxrwxrwx 1 root root 25 Jul 26 15:42 /etc/alternatives/iptables -> /usr/sbin/iptables-legacy
ls -l /usr/sbin/iptables-legacy
lrwxrwxrwx 1 root root 20 Mar  1 15:28 /usr/sbin/iptables-legacy -> xtables-legacy-multi


ls -l /etc/alternatives/ip6tables
lrwxrwxrwx 1 root root 26 Jul 26 15:42 /etc/alternatives/ip6tables -> /usr/sbin/ip6tables-legacy
ls -l /usr/sbin/ip6tables-legacy
lrwxrwxrwx 1 root root 20 Mar  1 15:28 /usr/sbin/ip6tables-legacy -> xtables-legacy-multi

 

Version is 4.3.1 (like the Pihole-team said the fixed the buster lighttpd problem):

Pi-hole Version v4.3.1 Web Interface Version v4.3 FTL Version v4.3.1

 

But now it seems to work with buster :)

 

BTW: for the redirect to the /admin page (400 Bad Request before) I also had to edit /etc/lighttpd/lighttpd.conf like before

 

 

Share this post


Link to post
Share on other sites

Today I did test to install pihole 4.3.1 on a Odroid C2 with

Debian Buster with Armbian Linux 5.3.0-rc8-meson64
package bsp-kernel[5.96] u-boot[5.96] dtb[5.96] firmware[5.96] config[5.96]

 

The installer did quit while setting up php (serveral times)

 

So I did a apt upgrade and apt did complete to install 9 packages (including php).

 

After that I restarted the pihole installer - he did found the php-installation and did install pihole FTLL an so on...

and completed the installation successfully :)

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
0