# Running asp.net mvc on nginx

**URL:** <https://www.ruby-forum.com/t/running-asp-net-mvc-on-nginx/193527>\
**Category:** NGINX\
**Created:** [August 19, 2010, 7:37am UTC](https://www.ruby-forum.com/t/running-asp-net-mvc-on-nginx/193527 "2010-08-19T07:37:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shih-Chi\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/4491bb/32.png) [@Shih-Chi\_C](https://www.ruby-forum.com/u/Shih-Chi_C)\
**Post date:** [August 19, 2010, 7:37am UTC](https://www.ruby-forum.com/t/running-asp-net-mvc-on-nginx/193527/1 "2010-08-19T07:37:31Z")

</div>

Hi,

I am trying to run [asp.net](http://asp.net) 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/your.domain1.xyz.access.log;

```
     location / {
             root /var/www/MvcTest;
             index Default.aspx Index.aspx;
             fastcgi_index Index.aspx;
             fastcgi_pass 127.0.0.1:9000;
             include /etc/nginx/fastcgi_params;

```

MvcTest is from publishing an MVC project from visual studio 2008. The  
code  
is autogenerated by visual studio so it’s very simple. It can show  
simple  
greeting message.  
The folder has sub-directories like bin, Content, Scripts, Views and  
etc.  
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/  
/socket=tcp:127.0.0.1:9000

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 that it is spelled correctly.

\*Version information: \* Runtime: Mono 2.4.4; [ASP.NET](http://ASP.NET) Version:  
2.0.50727.1433

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  
and  
set root to deepFolder, the index.html will not be displayed and that’s  
why  
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  
[http://software.shihchichen.co.cc/](http://software.shihchichen.co.cc/)

---

<div class="post-metadata">

**Author:** ![Shih-Chi\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/4491bb/32.png) [@Shih-Chi\_C](https://www.ruby-forum.com/u/Shih-Chi_C)\
**Post date:** [August 19, 2010, 2:28pm UTC](https://www.ruby-forum.com/t/running-asp-net-mvc-on-nginx/193527/2 "2010-08-19T14:28:29Z")

</div>

Hi,  
Nginx configuration with mono can see here:

> **[Nginx | Mono](https://www.mono-project.com/FastCGI_Nginx/)**

The error info looks like mono’s, so i think you’d better to check  
mono’s  
config.

2010/8/19 Shih-Chi C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> ## greeting message.\
> 
> [http://software.shihchichen.co.cc/](http://software.shihchichen.co.cc/)
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://nginx.org/mailman/listinfo/nginx)

–  
|| ||  
|| ||  
||| ||| |||| || || |||||  
|| | || || || ||| ||  
|| | || || ||| ||  
|| | || ||||| || ||||  
|| || || || || ||  
|| || || || || ||  
|| || ||||| || |||||
