asp mvc home root not working with mono, fastcgi a

2019-02-05 07:39发布

i have mono 2.6.7 and I'm trying to port an ASP.NET MVC application. i've managed to solve the case sensitivity problem by setting the variable MONO_IOMAP=all . I have still one more problem, my home root isn't working. I get a page not found error (although /home and /home/index work). I'm using nginx and fastcgi. here is my configuration for nginx:

server {
    listen       80;
    server_name  mydomain.com;
    access_log   /var/log/nginx/mydomain.com.log;

    location / {
        root  /home/ec2-user/www/mydomain-web/;
        index  index.html index.htm default.aspx Default.aspx;
        fastcgi_index Default.aspx;
        fastcgi_pass 127.0.0.1:9000;
        include /etc/nginx/fastcgi_params;
    }

2条回答
时光不老,我们不散
2楼-- · 2019-02-05 08:12

Change fastcgi_index Default.aspx;

to

fastcgi_index /Home;

查看更多
Ridiculous、
3楼-- · 2019-02-05 08:22

This ended up working for me.

server {
    listen       80;
    server_name  mydomain.com;
    access_log   /var/log/nginx/mydomain.com.log;

    location / {
        root  /home/ec2-user/www/mydomain-web/;
        fastcgi_index /;
        fastcgi_pass 127.0.0.1:9000;
        include /etc/nginx/fastcgi_params;
}

I removed the index line completely and changed the fastcgi_index to fastcgi_index /;. Using Mono 3.0.3/ASP.NET MVC3.

查看更多
登录 后发表回答