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?