Running mvc on nginx


I am trying to run mvc with nginx under ubuntu Linux.

Here is part of my setting for /etc/nginx/sites-available/default

ver {
listen 80;
server_name localhost;
access_log /var/log/nginx/;

     location / {
             root /var/www/MvcTest;
             index Default.aspx Index.aspx;
             fastcgi_index Index.aspx;
             include /etc/nginx/fastcgi_params;

MvcTest is from publishing an MVC project from visual studio 2008. The
is autogenerated by visual studio so it’s very simple. It can show
greeting message.
The folder has sub-directories like bin, Content, Scripts, Views and
Index.aspx is under Views/Home

However when i try to run that on nginx with
sudo fastcgi-mono-server2 /applications=localhost:/:/var/www/MvcTest/

I got Error 404

Server Error in ‘/’ Application

The resource cannot be found.

*Description: *HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make sure
it is spelled correctly.

*Version information: * Runtime: Mono 2.4.4; ASP.NET Version:

I am guessing is it because nginx didnt find Index.aspx?
I tried the similar thing with nginx-default and it worked well.

However if i put nginx-default under another folder called deepFolder
set root to deepFolder, the index.html will not be displayed and that’s
i had this assumption.

Would you give me some advices?

Sincerely Yours

Steven Shih-Chi C.

Steven Shih-Chi C.

MS Candidate in Computer Engineering
McCormick School of Engineering and Applied Science
Northwestern University
(847) 845-1519

Nginx configuration with mono can see here:
The error info looks like mono’s, so i think you’d better to check

2010/8/19 Shih-Chi C. [email protected]

greeting message.\

nginx mailing list
[email protected]
nginx Info Page

|| ||
|| ||
||| ||| |||| || || |||||
|| | || || || ||| ||
|| | || || ||| ||
|| | || ||||| || ||||
|| || || || || ||
|| || || || || ||
|| || ||||| || |||||