2

On a testing box:

root@ubuntu:/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 (compiled from github)

root@ubuntu:/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 config:

root@ubuntu:/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;
        }
}

Running fastcgi-mono-server4:

root@ubuntu:/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/

I get nothing but a 404, I've set permissions 775 just to make sure it isn't a permission issue on the DLLs, no go.

I've even tried this in my global.asax:

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

Still just 404s instead of errors so xsp seems to be not even acknowledging there is an application here... Runs fine on Windows boxes. Am I missing something? I'd like to develop Mono on Linux too...

StrangeWill
  • 2,106
  • 1
  • 23
  • 36

1 Answers1

3

What error are you getting?

Maybe check out how the Heroku .NET buildpack gets this running: https://github.com/friism/dev-heroku-buildpack-mono/blob/master/nginx/start#L8

There are a couple of blog posts with details, and the README:

You can generally get fastcgi-mono-server to output additional debugging info by passing this parameter: /printlog=True

friism
  • 19,068
  • 5
  • 80
  • 116
  • http://www.philliphaydon.com/2013/06/setting-up-mono-on-nginx/ I was struggling and this site was quite helpful – Suman Mar 24 '14 at 08:37