2016-09-13 133 views
1

這是我lighttpd.conf文件看起來是這樣的:故障運行的lighttpd

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,但似乎沒有任何工作。謝謝。

回答

0

2016年9月13日19時49分五十秒:(mod_fastcgi.c.1112)FastCGI的-後端/home/ashley/leagueratings.py啓動失敗:

不出現成爲一個Web服務器問題。

你試過手動啓動leagueratings.py嗎?有可能缺少一個需要的python模塊(並且需要安裝),或者python腳本中存在語法錯誤。