0

Here is my /etc/nginx/sites-available/default:

# Sample site
server {
        listen   80; ## listen for ipv4

        server_name  web;

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

        location / {
                root   /srv/www/web/;
                index  default.cshtml Default.cshtml;
                fastcgi_index Default.cshtml;
                fastcgi_pass 127.0.0.1:9000;
                include /etc/nginx/fastcgi_params;
        }
}

# Another Sample site
server {
        listen   80; ## listen for ipv4

        server_name  irws;

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

        location / {
                root   /srv/www/irws/;
                index  default.cshtml Default.cshtml;
                fastcgi_index Default.cshtml;
                fastcgi_pass 127.0.0.1:9000;
                include /etc/nginx/fastcgi_params;
        }
}

Here is my script that starts fastcgi-mono-server4:

export MONO_IOMAP=all  
fastcgi-mono-server4 /address=127.0.0.1 /applications=irws:/:/srv/www/irws/,web:/:/var/www/web/ /socket=tcp:9000 &

I can't figure out why only the first app defined in the /applications parameter works. In this case, only http://irws/ works, but http://web/ does not. If I switch them to:

fastcgi-mono-server4 /address=127.0.0.1 /applications=web:/:/srv/www/web/,irws:/:/var/www/irws/ /socket=tcp:9000 &

Then only http://web/ works and http://irws stops working. I think I'm missing something pretty simple here.

The error message I get looks like this:

Directory does not exists Parameter name: value

Description: HTTP 400. Error processing request.

Stack Trace:

System.ArgumentException: Directory does not exists
Parameter name: value
  at System.IO.FileSystemWatcher.set_Path (System.String value) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileSystemWatcher:set_Path (string)
  at System.Web.HttpRuntime.SetupOfflineWatch () [0x00000] in <filename unknown>:0 
  at System.Web.HttpRuntime.Process (System.Web.HttpWorkerRequest req) [0x00000] in <filename unknown>:0 
  at System.Web.HttpRuntime.RealProcessRequest (System.Object o) [0x00000] in <filename unknown>:0 
  at System.Web.HttpRuntime.ProcessRequest (System.Web.HttpWorkerRequest wr) [0x00000] in <filename unknown>:0 
  at Mono.WebServer.MonoWorkerRequest.ProcessRequest () [0x00000] in <filename unknown>:0 

Any idea what I might be missing here?

1 Answer 1

1

The --applications parameter specifies paths within the same virtual host. You probably need to write a webapp file and specify it with the --appconfigfile parameter in order to serve multiple virtual hosts.

2
  • Sorry for my noobiness. I scanned through the map page but I can't figure it out by myself. Can you help? I imagine I need to create two webapp files (irws.webapp & web.webapp), but I can't figure out how to construct the fastcgi command. Feb 12, 2013 at 19:25
  • Figured it out with help of this answer: stackoverflow.com/a/12188358/99373 Feb 12, 2013 at 20:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .