2013-10-07 2 views
2

На коробке тестирования:моно + MVC 4 + .NET 4.0 + Nginx 404 (также с XSP)

[email protected]:/var/www# mono --version 
Mono JIT compiler version 3.0.6 (Debian 3.0.6+dfsg-1~exp1~pre1) 
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com 
    TLS:   __thread 
    SIGSEGV:  altstack 
    Notifications: epoll 
    Architecture: amd64 
    Disabled:  none 
    Misc:   softdebug 
    LLVM:   supported, not enabled. 
    GC:   Included Boehm (with typed GC and Parallel Mark) 

XSP (составленный из GitHub)

[email protected]:/var/www# xsp4 --version 
Mono.WebServer2.dll 0.4.0.0 
(c) (c) 2002-2011 Novell, Inc. 
Classes for embedding an ASP.NET server in your application .NET 4.0. 

Nginx конфигурации:

[email protected]:/var/www# cat /etc/nginx/sites-available/default 
server { 
     listen 80; 
     access_log /var/log/nginx/mono.log; 
     error_log /var/log/nginx/mono.err.log; 

     location/{ 
       root /var/www/; 
       index index.html index.htm default.aspx Default.aspx; 
       fastcgi_pass 127.0.0.1:9000; 
       include /etc/nginx/fastcgi_params; 
     } 
} 

Запуск FastCGI-моно-сервера4:

[email protected]:/var/www# fastcgi-mono-server4 /applications="/:/var/www/" /socket=tcp:127.0.0.1:9000 -v 
[2013-10-06 16:11:07.579396] Notice : Adding applications '/:/var/www/'... 
[2013-10-06 16:11:07.607587] Notice : Registering application: 
[2013-10-06 16:11:07.607832] Notice :  Host:   any 
[2013-10-06 16:11:07.608034] Notice :  Port:   any 
[2013-10-06 16:11:07.608230] Notice :  Virtual path:/
[2013-10-06 16:11:07.608454] Notice :  Physical path: /var/www/ 

Я получаю ничего, кроме 404, я установил разрешения 775, чтобы убедиться, что это не проблема разрешения на DLL.

Я даже попытался это в моем global.asax:

protected void Application_BeginRequest(object sender, EventArgs e) 
{ 
    throw new Exception("test"); 
} 

Еще только ошибки 404 вместо ошибки так XSP, кажется, еще не признавая есть приложение здесь ... прекрасно работает на коробках для Windows , Я что-то упускаю? Я хотел бы разработать Mono на Linux тоже ...

+0

http://www.mono-project.com/docs/web/fastcgi/nginx/ –

ответ

3

Какая ошибка вы получаете?

Может проверить, как buildpack Heroku .NET получает этот ход: https://github.com/friism/dev-heroku-buildpack-mono/blob/master/nginx/start#L8

Есть несколько сообщений в блоге с подробной и README:

Обычно вы можете получить fastcgi-mono-server для вывода дополнительной информации об отладке, передав этот параметр: /printlog=True

+0

http: // www .philliphaydon.com/2013/06/setup-up-mono-on-nginx/ Я боролся, и этот сайт был очень полезен – Suman