这是我的/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; } }
这是我的脚本启动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 &
我不明白为什么只有在/applications参数中定义的第一个应用/applications工作。 在这种情况下,只有http://irws/ works,但是http://web/没有。 如果我切换到:
fastcgi-mono-server4 /address=127.0.0.1 /applications=web:/:/srv/www/web/,irws:/:/var/www/irws/ /socket=tcp:9000 &
然后只有http://web/ works和http://irws停止工作。 我想我在这里错过了很简单的事情。
我得到的错误信息如下所示:
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
任何想法,我可能会错过这里?
--applications参数指定同一虚拟主机内的path。 您可能需要编写一个webapp文件,并使用--appconfigfile参数指定它以便为多个虚拟主机提供服务。