关于nginx/mono 2.8的ASP.Net MVC 2

Vic*_*din 7 mono nginx asp.net-mvc-2

我正在尝试在Linux环境中设置ASP.Net MVC 2应用程序.我在VirtualBox上安装了Ubuntu 10.10,然后从源代码安装了Mono 2.8.之后我安装了nginx并按照此处的建议进行配置.不幸的是,FastCGI显示标准错误500页:

No Application Found
Unable to find a matching application for request:
Host localhost:80
Port 80
Request Path /Default.aspx
Physical Path /var/www/mvc/Default.aspx
Run Code Online (Sandbox Code Playgroud)

我的应用程序位于/ var/www/mvc目录中.我试图创建一些存根Default.aspx文件并将其放在我的应用程序的根目录中,但它没有帮助,发生相同的错误.谢谢.

小智 17

I've been doing some testing with this as well, using all ubuntu10.10 binaries. From what I can make from it, either nginx fails to pass the hostname of the mono server fails to receive it over the fastcgi protocol. Anyhow, the tutorial line:

 fastcgi-mono-server2 /applications=www.domain1.xyz:/:/var/www/www.domain1.xyz/ /socket=tcp:127.0.0.1:9000
Run Code Online (Sandbox Code Playgroud)

doesn't work. Removing the hostname makes the thing work:

 fastcgi-mono-server2 /applications=/:/var/www/www.domain1.xyz/ /socket=tcp:127.0.0.1:9000
Run Code Online (Sandbox Code Playgroud)

but this of course blocks the use of multiple virtual mono hosts.


Tom*_*son 2

您的应用程序是否可以与 xsp 配合使用(如果您使用的是 .net 4.0,则为 xsp4)?在尝试配置与另一个 Web 服务器的连接之前,您需要确保其正常工作。

nginx 知道在哪里可以找到 mono 吗?您很可能有并行安装,并且它不会位于默认路径中。

我使用 apache,但您可能仍然会发现我博客上的一些说明很有用: http://tqcblog.com/2010/04/02/ubuntu-subversion-teamcity-mono-2-6-and-asp-net- mvc/