【问题标题】:Trouble running lighttpd with webpy使用 webpy 运行 lighttpd 时遇到问题
【发布时间】:2016-09-13 20:06:53
【问题描述】:

这是我的 lighttpd.conf 文件的样子:

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

server.document-root        = "/home/ashley/leagueratings"
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"


## Use ipv6 if available
#include_shell "/usr/share/lighttpd/use-ipv6.pl"


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

include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"

server.modules   += ( "mod_fastcgi" )
server.modules   += ( "mod_rewrite" )

 fastcgi.server = ( "/leagueratings.py" =>
 ("/" => ( "socket" => "/tmp/fastcgi.socket",
    "bin-path" => "/home/ashley/leagueratings.py",
    "max-procs" => 1,
   "bin-environment" => (
     "REAL_SCRIPT_NAME" => ""
   ),
   "check-local" => "disable"
 ))
 )

 url.rewrite-once = (
   "^/favicon.ico$" => "/static/favicon.ico",
   "^/static/(.*)$" => "/static/$1",
   "^/(.*)$" => "/leagueratings.py/$1",
 )

我都做过

chown www-data:www-data leagueratings.py

chmod +x leagueratings.py

但我无法连接到我的网站。在我更改 lighttpd.conf 之前,默认站点以前工作过

这是错误日志

2016-09-13 19:37:35: (log.c.164) server started 
2016-09-13 19:49:49: (server.c.1558) server stopped by UID = 0 PID = 1 
2016-09-13 19:49:50: (log.c.164) server started 
2016-09-13 19:49:50: (mod_fastcgi.c.1112) the fastcgi-backend /home/ashley/leagueratings.py failed to start: 
2016-09-13 19:49:50: (mod_fastcgi.c.1116) child exited with status 2 /home/ashley/leagueratings.py 
2016-09-13 19:49:50: (mod_fastcgi.c.1119) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.
If this is PHP on Gentoo, add 'fastcgi' to the USE flags. 
2016-09-13 19:49:50: (mod_fastcgi.c.1406) [ERROR]: spawning fcgi failed. 
2016-09-13 19:49:50: (server.c.1022) Configuration of plugins failed. Going down.

请帮助我很长一段时间以来,我一直在尝试让我的 webpy 服务器启动并运行以进行生产。我也尝试过 apache2 和 nginx,但似乎没有任何效果。谢谢。

【问题讨论】:

    标签: python lighttpd web.py


    【解决方案1】:

    2016-09-13 19:49:50: (mod_fastcgi.c.1112) fastcgi-backend /home/ashley/leaguratings.py 启动失败:

    这似乎不是网络服务器问题。

    您是否尝试过手动启动leagueratings.py?可能是缺少所需的 python 模块(需要安装),或者 python 脚本中存在语法错误。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-10-15
      • 2018-11-20
      • 1970-01-01
      • 2017-10-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-05
      相关资源
      最近更新 更多