nginx虽然体型庞大,却不接受大身体

时间:2014-10-19 22:43:53

标签: nginx passenger osx-snow-leopard

通过passenger和nginx的rails3.2.18应用程序在nginx日志中生成如下:2014/10/20 00:31:36 [error] 85#0: *32 client intended to send too large body: 4066821 bytes, client: XX.XXX.XX.XXX, server: app3.iwant2go2.com, request: "POST /bozzadocuments/1 HTTP/1.1", host: "app3.iwant2go2.com", referrer: "http://app3.iwant2go2.com/bozzadocuments/1/edit"

在日志中提交后会立即注册错误,但浏览器会在15到30秒之后收到响应。 已编辑/usr/local/etc/nginx/nginx.conf文件(OSX 10.6)以允许充足的body_size

worker_processes  1;

events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    client_body_in_file_only clean;
    client_body_buffer_size 32k;
    client_max_body_size 200m;
    sendfile        on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    send_timeout 300s;

    #gzip  on;

    # Phusion Passenger config
    passenger_root /usr/local/opt/passenger/libexec/lib/phusion_passenger/locations.ini;
    passenger_ruby /Users/jeromepmmfcamus/.rvm/rubies/ruby-1.9.3-p547/bin/ruby;
    }
}

这种配置在哪里出错?

1 个答案:

答案 0 :(得分:0)

我没记得这次安装是通过乘客完成的。

passenger-install-nginx-module

这会在/opt/

下安装nginx.confs
/opt/nginx/conf/nginx.conf

这样做的一个线索就是检查homebrew.mxcl.nginx.plist的内容......并且会更快地到达那里。