使用webpy运行lighttpd时出现问题

时间:2016-09-13 20:06:54

标签: python lighttpd web.py

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

new

我已经完成了两次

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

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

这是错误日志

chmod +x leagueratings.py

请帮助我,我一直试图让我的webpy服务器启动并运行很长一段时间。我也试过apache2和nginx,但似乎没什么用。谢谢。

1 个答案:

答案 0 :(得分:0)

  

2016-09-13 19:49:50:(mod_fastcgi.c.1112)fastcgi-backend /home/ashley/leagueratings.py未能启动:

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

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