单声道+;MVC 4+。NET 4.0+;nginx 404(也带有XSP)

单声道+;MVC 4+。NET 4.0+;nginx 404(也带有XSP),nginx,mono,xsp,Nginx,Mono,Xsp,在测试箱上: root@ubuntu:/var/www# mono --version Mono JIT compiler version 3.0.6 (Debian 3.0.6+dfsg-1~exp1~pre1) Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: altstac

在测试箱上:

root@ubuntu:/var/www# mono --version
Mono JIT compiler version 3.0.6 (Debian 3.0.6+dfsg-1~exp1~pre1)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           __thread
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  amd64
    Disabled:      none
    Misc:          softdebug
    LLVM:          supported, not enabled.
    GC:            Included Boehm (with typed GC and Parallel Mark)
XSP(从github编译)

nginx配置:

root@ubuntu:/var/www# cat /etc/nginx/sites-available/default
server {
        listen 80;
        access_log /var/log/nginx/mono.log;
        error_log /var/log/nginx/mono.err.log;

        location / {
                root /var/www/;
                index index.html index.htm default.aspx Default.aspx;
                fastcgi_pass 127.0.0.1:9000;
                include /etc/nginx/fastcgi_params;
        }
}
运行fastcgi-mono-server4:

root@ubuntu:/var/www# fastcgi-mono-server4 /applications="/:/var/www/" /socket=tcp:127.0.0.1:9000 -v
[2013-10-06 16:11:07.579396] Notice : Adding applications '/:/var/www/'...
[2013-10-06 16:11:07.607587] Notice : Registering application:
[2013-10-06 16:11:07.607832] Notice :     Host:          any
[2013-10-06 16:11:07.608034] Notice :     Port:          any
[2013-10-06 16:11:07.608230] Notice :     Virtual path:  /
[2013-10-06 16:11:07.608454] Notice :     Physical path: /var/www/
我只得到了404,我设置了权限775只是为了确保它不是DLL上的权限问题,不行

我甚至在我的global.asax中尝试过:

protected void Application_BeginRequest(object sender, EventArgs e)
{
    throw new Exception("test");
}

仍然只有404而不是错误,所以xsp似乎甚至不承认这里有一个应用程序。。。在Windows设备上运行良好。我错过什么了吗?我也想在Linux上开发Mono…

您遇到了什么错误

也许可以看看Heroku.NET构建包是如何运行的:

这里有几篇详细的博客文章和自述:

通过传递以下参数,您通常可以让fastcgi mono服务器输出额外的调试信息:
/printlog=True

我一直在努力,这个站点非常有用
protected void Application_BeginRequest(object sender, EventArgs e)
{
    throw new Exception("test");
}