Lighttpd crash on Debian9 sid

Server env: Linux xxx 4.19.0-2-amd64 #1 SMP Debian 4.19.16-1 (2019-01-17) x86_64 GNU/Linux

Expected Behaviour:

Enable to start lighttpd

Actual Behaviour:

Lighttpd unable to start

Debug Token:

Your debug token is: yw90dcwdn1

Caddy latest version act as reverse proxy forward HTTPS to lighttpd

  // Caddy config
  https://xxx.com {
  basicauth / xxx xxx 
  gzip
  tls /etc/letsencrypt/live/xxx/fullchain.pem /etc/letsencrypt/live/xxx/privkey.pem
  proxy / 127.0.0.1:82/admin {
        transparent
  }

Lighttpd config, I have to disable this 2 lines in order able to start it

server.modules = (
	"mod_access",
	"mod_accesslog",
	"mod_auth",
	"mod_expire",
	"mod_compress",
	"mod_redirect",
	"mod_setenv",
	"mod_rewrite"
)

server.document-root        = "/var/www/html"
server.error-handler-404    = "pihole/index.php"
server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
server.errorlog             = "/var/log/lighttpd/error.log"
server.pid-file             = "/var/run/lighttpd.pid"
server.username             = "www-data"
server.groupname            = "www-data"
server.port                 = 82 # I change this port
accesslog.filename          = "/var/log/lighttpd/access.log"
accesslog.format            = "%{%s}t|%V|%r|%s|%b"

index-file.names            = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny             = ( "~", ".inc", ".md", ".yml", ".ini" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

compress.cache-dir          = "/var/cache/lighttpd/compress/"
compress.filetype           = ( "application/javascript", "text/css", "text/html", "text/plain" )

#### I DISABLED THIS 2 LINES ####
##include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
##include_shell "/usr/share/lighttpd/create-mime.assign.pl"

# Prevent Lighttpd from enabling Let's Encrypt SSL for every blocked domain
#include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
include_shell "find /etc/lighttpd/conf-enabled -name '*.conf' -a ! -name 'letsencrypt.conf' -printf 'include \"%p\"\n' 2>/dev/null"

# If the URL starts with /admin, it is the Web interface
$HTTP["url"] =~ "^/admin/" {
    # Create a response header for debugging using curl -I
    setenv.add-response-header = (
        "X-Pi-hole" => "The Pi-hole Web interface is working!",
        "X-Frame-Options" => "DENY"
    )

    $HTTP["url"] =~ ".ttf$" {
        # Allow Block Page access to local fonts
        setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
    }
}

# Block . files from being served, such as .git, .github, .gitignore
$HTTP["url"] =~ "^/admin/\.(.*)" {
     url.access-deny = ("")
}

# Add user chosen options held in external file
# This uses include_shell instead of an include wildcard for compatibility
include_shell "cat external.conf 2>/dev/null"

I know, but I wanna give it a try.
Because on Debian9 a lot of software I use not actually up to date..
I don't know why. like Alpine linux almost got every program to recent version.
Just curios why lighttpd wont start while using both two lines of code
My server did have IPv6 :thinking:

Debian Sid is not supported right now.

I use caddy server instead of Apache

Caddy + php fpm for web interface, uninstall lighttpd.
but everytime update, will auto install lighttpd again..
I hope next release can let user choose install or remove lighttpd on update.
or uninstall lighttpd only

The installer asks if you want to have lighttpd installed or not. You may have upgraded from an earlier version that did not have that option and missed the code that fixed setupVars.conf with the proper lines. What is the contents of your setupVars.conf?

And your original report says that you expected lighttpd to start, but now you don't want it installed at all?

It was my fault to try lighttpd on Debian9 sid.
If lighttpd is able to run on Debian9 sid without any problem, then I will continue to use it.
Of course, I can manually comment out these 2 lines. then everything works fine.

##include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
##include_shell "/usr/share/lighttpd/create-mime.assign.pl"

Another problem is when I run pihole -up and update, the entire lighttpd.conf will get from the git repo, then the update process will be stuck at installing lighttpd.
That's why I hope there will be an option check if this machine doesn't have lighttpd installed when it runs an update, it will automatically skip lighttpd install process.

There is, what is the contents of your setupVars.conf file and I'll tell you what to put there to prevent lighttpd from being installed.

Cool, so I set this to false?

WEBPASSWORD=xxx
BLOCKING_ENABLED=true
DNSMASQ_LISTENING=single
DNS_FQDN_REQUIRED=true
DNS_BOGUS_PRIV=true
DNSSEC=false
CONDITIONAL_FORWARDING=false
PIHOLE_INTERFACE=eth0
IPV4_ADDRESS=xxxx/32
IPV6_ADDRESS=xxxx
PIHOLE_DNS_1=::1#52
PIHOLE_DNS_2=
QUERY_LOGGING=true
INSTALL_WEB_SERVER=true
INSTALL_WEB_INTERFACE=true
LIGHTTPD_ENABLED=false ??

INSTALL_WEB_SERVER=true

Set that to false

1 Like

1 more question.
If I reformat my VPS to debian9 stretch. How can I install some package from sid?
like php7.3, only php7.3 gonna install from sid.
Any tutorial or keyword I can search on Google

Thanks

That's going to be a bad experience. You can try apt pinning, but pulling in a package like that from another release is going to need dependencies that do not exist in Stretch. And then when you try to pull in the dependencies from Sid to Stretch you end up needing the dependencies of the dependency.

hmm,
So I would rather use Docker or learn how to compile php7.3 on Debian9 Stretch.

Just checked and both Debian and Raspbian have packages for PHP 7.3:

http://deb.debian.org/debian/pool/main/p/php7.3/
http://raspbian.raspberrypi.org/raspbian/pool/main/p/php7.3/

Add a line to /etc/apt/sources.list with Buster(next stable release) and they will become available:

eg for Raspbian:

deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi

Need to run below one after changing the sources.list file:

sudo apt update

EDIT:

pi@noads:~ $ cat /etc/apt/sources.list
deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi

deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi

pi@noads:~ $ sudo apt update
Get:1 http://archive.raspberrypi.org/debian stretch InRelease [25.4 kB]
Get:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease [15.0 kB]
Get:3 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Get:4 http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages [11.7 MB]
Get:5 http://archive.raspberrypi.org/debian stretch/main armhf Packages [212 kB]
Get:6 http://archive.raspberrypi.org/debian stretch/main armhf Contents (deb) [681 kB]
Get:7 http://archive.raspberrypi.org/debian stretch/ui armhf Packages [42.0 kB]
Get:8 http://archive.raspberrypi.org/debian stretch/ui armhf Contents (deb) [103 kB]
Get:9 http://raspbian.raspberrypi.org/raspbian stretch/main armhf Contents (deb) [35.6 MB]
Get:10 http://raspbian.raspberrypi.org/raspbian stretch/non-free armhf Packages [95.5 kB]
Get:11 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.1 MB]
Get:12 http://raspbian.raspberrypi.org/raspbian buster/main armhf Contents (deb) [40.0 MB]
Get:13 http://raspbian.raspberrypi.org/raspbian buster/contrib armhf Packages [59.1 kB]
Get:14 http://raspbian.raspberrypi.org/raspbian buster/contrib armhf Contents (deb) [211 kB]
Get:15 http://raspbian.raspberrypi.org/raspbian buster/non-free armhf Packages [103 kB]
Get:16 http://raspbian.raspberrypi.org/raspbian buster/non-free armhf Contents (deb) [780 kB]
Get:17 http://raspbian.raspberrypi.org/raspbian buster/rpi armhf Packages [1,360 B]
Get:18 http://raspbian.raspberrypi.org/raspbian buster/rpi armhf Contents (deb) [328 B]
Fetched 103 MB in 2min 51s (597 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
477 packages can be upgraded. Run 'apt list --upgradable' to see them.

pi@noads:~ $ apt policy php7.3-cli
php7.3-cli:
  Installed: (none)
  Candidate: 7.3.2-3
  Version table:
     7.3.2-3 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages

Yeah, don't do that.

At least you dont get lost in dependencies :wink:

Nope, but you added Buster as a full repository so anytime a package is updated on Buster (like the kernel being tested) it will attempt to be installed on that Stretch device and break hard. If you're going to add a cross release repository at least limit it to only the packages you would like installed and not the entire distribution.

Could add buster to sources.list initially to get PHP 7.3 installed and remove it afterwards again so as to not break other stuff when running updates.

I never tried but can imagine it works ok.
I wouldn't know how to pin all packages from Buster for just PHP 7.3.
Dependency forest again :wink:

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