asp mvc home root 不适用于 mono、fastcgi 和 nginx [英] asp mvc home root not working with mono, fastcgi and nginx

查看:17
本文介绍了asp mvc home root 不适用于 mono、fastcgi 和 nginx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有单声道 2.6.7,我正在尝试移植一个 ASP.NET MVC 应用程序.我设法通过设置变量 MONO_IOMAP=all 解决了区分大小写的问题.我还有一个问题,我的家庭根无法正常工作.我收到一个找不到页面的错误(尽管/home 和/home/index 有效).我正在使用 nginx 和 fastcgi.这是我对 nginx 的配置:

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;
    }

推荐答案

这个 最终为我工作.

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;
}

我完全删除了索引行并将fastcgi_index更改为fastcgi_index/;.使用 Mono 3.0.3/ASP.NET MVC3.

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

这篇关于asp mvc home root 不适用于 mono、fastcgi 和 nginx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆