我正在尝试使用 fastcgi-mono-server4 让 Mono 与 nginx 一起工作。nginx 和 fastcgi-mono-server4 显然正在通信(我可以使用 unix 和 tcp 套接字来达到那个程度),但是一旦 fastcgi-mono-server4 记录收到传入请求(当我用浏览器点击 nginx 监听 url 时) ),没有任何反应,并且 nginx 在一段时间后超时并出现 504 Gateway Time-out。这是来自 fastcgi-mono-server4 进程的日志(我以 root 身份运行所有内容,包括 nginx 工作进程,以排除权限问题):
$ sudo MONO_OPTIONS="--debug" MONO_IOMAP=all fastcgi-mono-server4 /printlog=True /applications=/test:/home/friis/code/TestingMono/TestingMono/ /socket=tcp:127.0.0.1:9000 /loglevels=Debug
[2013-07-31 21:33:15Z] Debug fastcgi-mono-server4
[2013-07-31 21:33:15Z] Debug Listening on port: 127.0.0.1
[2013-07-31 21:33:15Z] Debug Listening on address: 9000
[2013-07-31 21:33:15Z] Debug Root directory: /home/friism/code/TestingMono/TestingMono
[2013-07-31 21:33:15Z] Debug Max connections: 1024
[2013-07-31 21:33:15Z] Debug Max requests: 1024
[2013-07-31 21:33:15Z] Debug Multiplex connections: False
[2013-07-31 21:33:54Z] Debug Accepting an incoming connection.
[2013-07-31 21:33:54Z] Notice Beginning to receive records on connection.
[2013-07-31 21:33:54Z] Debug Record received. (Type: BeginRequest, ID: 1, Length: 8)
该TestingMono
目录包含一个 ASP.NET 应用程序,该应用程序使用 xsp4 可以正常工作。
调试此问题的任何建议?
版本:
$ mono --version
Mono JIT compiler version 3.0.12 (master/d6c5db8 Sat Jun 15 20:13:22 PDT 2013)
$ fastcgi-mono-server4 --version
fastcgi-mono-server4.exe 3.0.0.0
更新
nginx配置:
server {
listen 8080;
server_name localhost;
access_log /var/log/nginx/your.domain1.xyz.access.log;
location / {
fastcgi_pass 127.0.0.1:9000;
# fastcgi_pass unix:/tmp/nginx.socket;
include /etc/nginx/fastcgi_params;
}
}