启动时无法启动 Lighttpd Daemon

启动时无法启动 Lighttpd Daemon

每次打开笔记本电脑时,我都会看到以下错误消息Lighttpd在启动过程中多次出现(也出现在systemctl --failed):

Failed to start Lighttpd Daemon.
See 'systemctl status lighttpd.service' for details.

登录后,我输入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 Thu 2018-09-06 20:54:16 +05; 22min ago
  Process: 1170 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=127)

Sen 06 20:54:16 ibrokhim-i systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Sen 06 20:54:16 ibrokhim-i systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 5.
Sen 06 20:54:16 ibrokhim-i systemd[1]: Stopped Lighttpd Daemon.
Sen 06 20:54:16 ibrokhim-i systemd[1]: lighttpd.service: Start request repeated too quickly.
Sen 06 20:54:16 ibrokhim-i systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Sen 06 20:54:16 ibrokhim-i systemd[1]: Failed to start Lighttpd Daemon.

此外,这是来自的输出cat /etc/lighttpd/lighttpd.conf

server.modules = (
    "mod_access",
    "mod_alias",
    "mod_compress",
    "mod_redirect",
)

server.document-root        = "/var/www/html"
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
## Use ipv6 if available
#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"

我该如何解决这个问题?

答案1

事实证明这是一个存在多年的错误,如果这个问题是可以参考的。该漏洞评论中的几位用户声称安装gamin 包裹解决了这个问题。

我没有做过任何广泛的测试,但这似乎是一个解决方案。sudo apt install --reinstall lighttpd正常运行显示它无法启动lighttpd。但是,安装后gamin,输出看起来就像任何成功安装的软件包一样。现在systemctl status也显示lighttpd为活动状态并正在运行。

请注意,包libfam0在安装时被删除gamin。我不知道它是做什么用的,也不知道哪些包可能依赖于它,所以请记住这一点,除非其他人可以评论它的实用性和必要性。

答案2

我这样解决了:

chown -R www-data:www-data /var/log/lighttpd/

答案3

因此我必须进行清除,以清除系统中的额外文件:

sudo apt-get purge lighttpd

然后重新安装软件

sudo apt-get install lighttpd

这将重置所有 .conf 文件和其他文件

相关内容