Issues with lighttpd

Please follow the below template, it will help us to help you!

Expected Behaviour:

lighttpd should start up.

Actual Behaviour:

lighttpd fails to start and generates an error message

The appropriate error information from syslog:
Jun 01 13:41:03 jandus-v systemd[1]: Starting Lighttpd Daemon...
Jun 01 13:41:03 jandus-v lighttpd[1519]: /bin/sh: 1: /usr/share/lighttpd/create-mime.assign.pl: not found
Jun 01 13:41:03 jandus-v lighttpd[1519]: 2019-06-01 13:41:03: (configfile.c.1461) command "/usr/share/lighttpd/create-mime.assign.pl" exited non-zero:
Jun 01 13:41:03 jandus-v lighttpd[1519]: 2019-06-01 13:41:03: (configfile.c.1289) source: /etc/lighttpd/lighttpd.conf line: 53 pos: 14 parser failed s
Jun 01 13:41:03 jandus-v systemd[1]: lighttpd.service: Control process exited, code=exited, status=255/EXCEPTION
Jun 01 13:41:03 jandus-v systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Jun 01 13:41:03 jandus-v systemd[1]: Failed to start Lighttpd Daemon.
Jun 01 13:41:03 jandus-v systemd[1]: lighttpd.service: Service RestartSec=100ms expired, scheduling restart.
Jun 01 13:41:03 jandus-v systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 5.
Jun 01 13:41:03 jandus-v systemd[1]: Stopped Lighttpd Daemon.
Jun 01 13:41:03 jandus-v systemd[1]: lighttpd.service: Start request repeated too quickly.
Jun 01 13:41:03 jandus-v systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Jun 01 13:41:03 jandus-v systemd[1]: Failed to start Lighttpd Daemon.


It seems that the create-mine.assign.pl doesn't exist. I've checked and it isn't there. I've tried wiping the install many times and reinstalling and each time it's the same situation. It totally fails to start due to lack of that file.

Suggestions? Anything other info you need?

  • Jandus

content of /usr/share/lighttpd/create-mime.assign.pl:

#!/usr/bin/perl -w
use strict;
open MIMETYPES, "/etc/mime.types" or exit;
print "mimetype.assign = (\n";
my %extensions;
while(<MIMETYPES>) {
  chomp;
  s/\#.*//;
  next if /^\w*$/;
  if(/^([a-z0-9\/+-.]+)\s+((?:[a-z0-9.+-]+[ ]?)+)$/) {
    foreach(split / /, $2) {
      # mime.types can have same extension for different
      # mime types
      next if $extensions{$_};
      $extensions{$_} = 1;
      print "\".$_\" => \"$1\",\n";
    }
  }
}
print ")\n";

owner root / group root / permissions 755

just try putting the file there and see what happens

also run lighttpd -t -f /etc/lighttpd/lighttpd.conf, this should echo Syntax OK

hope it helps...

Thanks for the response, jpgpi250.

Created the create-mime.assign.pl file and changed ownership and permissions to what you stated.

Still failed.

Results from 'lighttpd -t -f /etc/lighttpd/lighttpd.conf' command:

jandus@jandus-v:/usr/share/lighttpd$ lighttpd -t -f /etc/lighttpd/lighttpd.conf
2019-06-01 14:43:44: (configfile.c.1461) command "find /etc/lighttpd/conf-enabled -name '*.conf' -a ! -name 'letsencrypt.conf' -printf 'include "%p"\n' 2>/dev/null" exited non-zero: 1
2019-06-01 14:43:44: (configfile.c.1289) source: /etc/lighttpd/lighttpd.conf line: 56 pos: 1 parser failed somehow near here: (EOL)

Any ideas now? :wink:

  • Jandus

What distribution and release are you using? Ubuntu 19?

DanSchaper:

KUbuntu 19.04.

We don't support that release yet as the files for lighttpd have been changed from all the previous releases.

DanShaper:

Owch! How about Kubuntu 18.04 or 18.10?

Those are fine. Redirecting...

DanSchaper:

Awesome. Appreciate the help! :slight_smile:

1 Like

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