ASP.Net MVC 2 on nginx/mono 2.8 ASP.Net MVC 2 on nginx/mono 2.8 nginx nginx

ASP.Net MVC 2 on nginx/mono 2.8


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

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

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


Since you are running ASP.NET MVC 2 application you should use fastcgi-mono-server4.


Adding following line in /etc/nginx/fastcgi_param resolves the issue for me. It also allows to use multiple virtual hosts.

fastcgi_param HTTP_HOST $host;