[Mono-aspnet-list] How to use nginx with mvc 4

Andrus kobruleht2 at hot.ee
Sat Dec 7 23:12:48 UTC 2013

Mono 3.2  MVC4 application is copied from in Debian Linux to 
/var/www/html/myapp directory.

In works from Apache with mod_mono.

nginx server is installed and mono fastcgi server is started using

/applications=erp.mysite.com:/:/var/www/html/ /socket=tcp:

typing erp.mysite.com:81/myapp in browser returns 500 error

    No Application Found

    Unable to find a matching application for request:

    Host    erp.mysite.com:81
    Port    81
    Request Path    /erp
    Physical Path    /var/www/html/myapp

How to use nginx with mvc4 ?

default file contains:

    server {

        listen   81;
        listen   [::]:81 default ipv6only=on;
        server_name  erp.mysite.com;
        access_log  /var/log/nginx/access.log;
        location / {
            root   /var/www/html;
            index  index.html index.htm;
        fastcgi_index Default.aspx;
        include /etc/nginx/fastcgi_params;


nginx conf is:

    user www-data;
    worker_processes  1;

    error_log  /var/log/nginx/error.log;
    pid        /var/run/nginx.pid;

    events {
        worker_connections  1024;
        # multi_accept on;

    http {
        include       /etc/nginx/mime.types;

        access_log    /var/log/nginx/access.log;

        sendfile        on;
        keepalive_timeout  65;
        tcp_nodelay        on;
        gzip  on;
        gzip_disable "MSIE [1-6]\.(?!.*SV1)";
        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;


More information about the Mono-aspnet-list mailing list