Python - 无法启动 lig​​httpd (Fastcgi) - Raspbian Stretch

Python - 无法启动 lig​​httpd (Fastcgi) - Raspbian Stretch

我正在尝试根据以下说明构建 DIY 项目https://github.com/nathanpjones/GaragePi

我成功安装了它。但是当我重新启动时,我无法访问网页。经过故障排除,我发现 lighttpd 服务没有运行。

我的lighttpd配置如下:

    "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
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"

# BEGIN GaragePi SERVER
fastcgi.server = ("/" =>
    ((
        "socket" => "/tmp/garage-fcgi.sock",
        "bin-path" => "/home/pi/GaragePi-work/start_webserver.fcgi",
        "check-local" => "disable",
        "max-procs" => 1,
        "fix-root-scriptname" => "enable",
    ))
)

alias.url += (
    "/static/" => "/home/pi/GaragePi-work/webserver/static/",
)
#END OF GaragePi SERVER

当我尝试手动启动 lig​​httpd 时,我得到以下输出

lighttpd.service - Lighttpd Daemon
   Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2019-04-08 10:09:54 BST; 14min ago
  Process: 785 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=255)
  Process: 776 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
 Main PID: 785 (code=exited, status=255)

Apr 08 10:09:54 raspberrypi systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Apr 08 10:09:54 raspberrypi systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.
Apr 08 10:09:54 raspberrypi systemd[1]: Stopped Lighttpd Daemon.
Apr 08 10:09:54 raspberrypi systemd[1]: lighttpd.service: Start request repeated too quickly.
Apr 08 10:09:54 raspberrypi systemd[1]: Failed to start Lighttpd Daemon.
Apr 08 10:09:54 raspberrypi systemd[1]: lighttpd.service: Unit entered failed state.
Apr 08 10:09:54 raspberrypi systemd[1]: lighttpd.service: Failed with result 'exit-code'.
sudo cat /var/log/lighttpd/error.log

2019-04-08 10:47:17: (log.c.217) server started
2019-04-08 10:47:17: (mod_fastcgi.c.1159) the fastcgi-backend /home/pi/GaragePi-                                                                                                                                                                                                                                             work/start_webserver.fcgi failed to start:
2019-04-08 10:47:17: (mod_fastcgi.c.1163) child exited with status 2 /home/pi/Ga                                                                                                                                                                                                                                             ragePi-work/start_webserver.fcgi
2019-04-08 10:47:17: (mod_fastcgi.c.1166) If you're trying to run your app as a                                                                                                                                                                                                                                              FastCGI backend, make sure you're using the FastCGI-enabled version.\nIf this is                                                                                                                                                                                                                                              PHP on Gentoo, add 'fastcgi' to the USE flags.
2019-04-08 10:47:17: (mod_fastcgi.c.1518) [ERROR]: spawning fcgi failed.
2019-04-08 10:47:17: (server.c.1269) Configuration of plugins failed. Going down                                                                                                                                                                                                                                             .
2019-04-08 10:47:19: (log.c.217) server started
2019-04-08 10:47:19: (mod_fastcgi.c.1159) the fastcgi-backend /home/pi/GaragePi-work/start_webserver.fcgi failed to start:
2019-04-08 10:47:19: (mod_fastcgi.c.1163) child exited with status 2 /home/pi/GaragePi-work/start_webserver.fcgi
2019-04-08 10:47:19: (mod_fastcgi.c.1166) If you're trying to run your app as aFastCGI backend, make sure you're using the FastCGI-enabled version.\nIf this is                                                                                                                                                                                                                                              PHP on Gentoo, add 'fastcgi' to the USE flags.
2019-04-08 10:47:19: (mod_fastcgi.c.1518) [ERROR]: spawning fcgi failed.
2019-04-08 10:47:19: (server.c.1269) Configuration of plugins failed. Going down

我尝试访问/var/run/lighttpd,但在使用 pi 帐户时权限被拒绝

有人可以帮我解决这个问题吗,因为我不懂 Python。

相关内容