Lighttpd startet nach dem Neustart nicht mehr

2287
Mark

Ich habe lightpd auf einem Raspberry Pi (laufender Raspbian Stretch) folgendermaßen installiert:

apt-get install -y lighttpd php-common php-cgi php lighty-enable-mod fastcgi-php usermod -aG www-data pi 

Nachdem ich den Dienst gestartet hatte, habe ich nachgeprüft und es funktionierte gut. Ich lieferte die PHP-Webseiten wie erwartet. Nach dem Neustart startet der Dienst nicht mehr:

$ systemctl status lighttpd.service ● lighttpd.service - Lighttpd Daemon Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sat 2017-09-09 21:26:39 CEST; 6min ago Process: 1302 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=255) Process: 1295 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS) Main PID: 1302 (code=exited, status=255)  Sep 09 21:26:38 rpi systemd[1]: lighttpd.service: Failed with result 'exit-code'. Sep 09 21:26:39 rpi systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart. Sep 09 21:26:39 rpi systemd[1]: Stopped Lighttpd Daemon. Sep 09 21:26:39 rpi systemd[1]: lighttpd.service: Start request repeated too quickly. Sep 09 21:26:39 rpi systemd[1]: Failed to start Lighttpd Daemon. Sep 09 21:26:39 rpi systemd[1]: lighttpd.service: Unit entered failed state. Sep 09 21:26:39 rpi systemd[1]: lighttpd.service: Failed with result 'exit-code'. 

Hier die Konfigurationsdatei:

$ cat /etc/lighttpd/lighttpd.conf  server.modules = ( "mod_access", "mod_alias", "mod_compress", "mod_redirect", )  server.document-root = "/home/pi/www" 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 = 80   index-file.names = ( "index.php", "index.html", "index.lighttpd.html" ) url.access-deny = ( "~", ".inc" ) static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )  compress.cache-dir = "/var/cache/lighttpd/compress/" compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )  # default listening port for IPv6 falls back to the IPv4 port include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port include_shell "/usr/share/lighttpd/create-mime.assign.pl" include_shell "/usr/share/lighttpd/include-conf-enabled.pl" 

Was soll ich überprüfen?

0

1 Antwort auf die Frage

0
Mark

You should check that if any directory it's going to use is not mounted to a tmpfs system. Lighttpd is not able to recreate them after installing.

The solution is then to manually create on every reboot the following directories:

  • /var/log/litghtpd
  • /var/run/lighttpd

owning them as www-data.