Welcome! Log In Create A New Profile

Advanced

running asp.net mvc on nginx

Shih-Chi Chen
August 19, 2010 01:42AM
Hi,

I am trying to run 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 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 Chen


--
Steven Shih-Chi Chen

MS Candidate in Computer Engineering
McCormick School of Engineering and Applied Science
Northwestern University
(847) 845-1519
http://software.shihchichen.co.cc/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

running asp.net mvc on nginx

Shih-Chi Chen August 19, 2010 01:42AM

Re: running asp.net mvc on nginx

Mars August 19, 2010 08:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 282
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready