mono 3.0.2 + xsp + lighttpd 提供空白页面

mono 3.0.2 + xsp + lighttpd 提供空白页面

我需要 MVC 4(和基本的 .NET 4.5)支持,因此我下载了 mono 3.0.2 并将其部署在 lighttpd 1.4.28 安装上,以及 xsp-2.10.2(是我能找到的最新版本)。

在完成配置教程后,我设法让 fastcgi 服务器启动,但所有页面都是空的。即使我转到不存在的 url 或直接 .aspx 文件,我也会得到一个空的 HTTP 200 响应。

调试日志文件没有显示任何可疑内容。

以下是日志:

[2012-12-12 15:15:38Z] Debug   Accepting an incoming connection.
[2012-12-12 15:15:38Z] Debug   Record received. (Type: BeginRequest, ID: 1, Length: 8)
[2012-12-12 15:15:38Z] Debug   Record received. (Type: Params, ID: 1, Length: 801)
[2012-12-12 15:15:38Z] Debug   Record received. (Type: Params, ID: 1, Length: 0)
[2012-12-12 15:15:38Z] Debug   Read parameter. (SERVER_SOFTWARE = lighttpd/1.4.28)
[2012-12-12 15:15:38Z] Debug   Read parameter. (SERVER_NAME = xxxx)
[2012-12-12 15:15:38Z] Debug   Read parameter. (GATEWAY_INTERFACE = CGI/1.1)
[2012-12-12 15:15:38Z] Debug   Read parameter. (SERVER_PORT = 80)
[2012-12-12 15:15:38Z] Debug   Read parameter. (SERVER_ADDR = xxxx)
[2012-12-12 15:15:38Z] Debug   Read parameter. (REMOTE_PORT = xxx)
[2012-12-12 15:15:38Z] Debug   Read parameter. (REMOTE_ADDR = xxxx)
[2012-12-12 15:15:38Z] Debug   Read parameter. (SCRIPT_NAME = /ViewPage1.aspx)

[2012-12-12 15:15:38Z] Debug   Read parameter. (PATH_INFO = )
[2012-12-12 15:15:38Z] Debug   Read parameter. (SCRIPT_FILENAME = /data/htdocs/ViewPage1.aspx)
[2012-12-12 15:15:38Z] Debug   Read parameter. (DOCUMENT_ROOT = /data/htdocs)
[2012-12-12 15:15:38Z] Debug   Read parameter. (REQUEST_URI = /ViewPage1.aspx)
[2012-12-12 15:15:38Z] Debug   Read parameter. (QUERY_STRING = )
[2012-12-12 15:15:38Z] Debug   Read parameter. (REQUEST_METHOD = GET)
[2012-12-12 15:15:38Z] Debug   Read parameter. (REDIRECT_STATUS = 200)
[2012-12-12 15:15:38Z] Debug   Read parameter. (SERVER_PROTOCOL = HTTP/1.1)
[2012-12-12 15:15:38Z] Debug   Read parameter. (HTTP_HOST = xxxxx)
[2012-12-12 15:15:38Z] Debug   Read parameter. (HTTP_CONNECTION = keep-alive)
[2012-12-12 15:15:38Z] Debug   Read parameter. (HTTP_CACHE_CONTROL = max-age=0)
[2012-12-12 15:15:38Z] Debug   Read parameter. (HTTP_USER_AGENT = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11)
[2012-12-12 15:15:38Z] Debug   Read parameter. (HTTP_ACCEPT = text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8)
[2012-12-12 15:15:38Z] Debug   Read parameter. (HTTP_ACCEPT_ENCODING = gzip,deflate,sdch)
[2012-12-12 15:15:38Z] Debug   Read parameter. (HTTP_ACCEPT_LANGUAGE = en-US,en;q=0.8)
[2012-12-12 15:15:38Z] Debug   Read parameter. (HTTP_ACCEPT_CHARSET = ISO-8859-1,utf-8;q=0.7,*;q=0.3)
[2012-12-12 15:15:38Z] Debug   Record received. (Type: StandardInput, ID: 1, Length: 0)
[2012-12-12 15:15:38Z] Debug   Record sent. (Type: EndRequest, ID: 1, Length: 8)

lighttpd配置:

server.modules += ( "mod_fastcgi" )

include "conf.d/mono.conf"

$HTTP["host"] !~ "^vdn\." {
    $HTTP["url"] !~ "\.(jpg|gif|png|js|css|swf|ico|jpeg|mp4|flv|zip|7z|rar|psd|pdf|html|htm)$" {

fastcgi.server += (
    "" => ((
        "socket" => mono_shared_dir + "fastcgi-mono-server",
        "bin-path" => mono_fastcgi_server,
        "bin-environment" => (
                "PATH" => mono_dir + "bin:/bin:/usr/bin:",
                "LD_LIBRARY_PATH" => mono_dir + "lib:",
                "MONO_SHARED_DIR" => mono_shared_dir,
                "MONO_FCGI_LOGLEVELS" => "Debug",
                "MONO_FCGI_LOGFILE" => mono_shared_dir + "fastcgi.log",
                "MONO_FCGI_ROOT" => mono_fcgi_root,
                "MONO_FCGI_APPLICATIONS" => mono_fcgi_applications
        ),
        "max-procs" => 1,
        "check-local" => "disable"
    ))
)
    }
}

引用的 mono.conf

index-file.names += ( "index.aspx", "default.aspx" )
var.mono_dir = "/usr/"
var.mono_shared_dir = "/tmp/"
var.mono_fastcgi_server = mono_dir + "bin/" + "fastcgi-mono-server4"
var.mono_fcgi_root = server.document-root
var.mono_fcgi_applications = "/:."

该服务器的文档根目录是 /data/htdocs。asp.net 文件位于此处。

lighttpd 错误日志没有显示任何内容。

非常感谢您的帮助!

答案1

lighttpd 正在运行,但是你的 mono 后端没有产生任何输出,并结束请求:

[2012-12-12 15:15:38Z] Debug   Record sent. (Type: EndRequest, ID: 1, Length: 8)

您还可以看到您的 Mono 应用程序已获取所有应获取的请求数据;现在它必须开始处理请求。

相关内容