RE: nginx for rgw fcgi frontend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Yehuada for the quick response!

My nginx is 1.4.6(old but default for Ubuntu trusty) and for some reason it's sending both CONTENT_LENGTH and HTTP_CONTENT_LENGTH to the backend even if I comment out the fastcgi_params part in the site conf

With below config this issue is fixed:
 
rgw content length compat = true


Thanks, -yuan

-----Original Message-----
From: Yehuda Sadeh-Weinraub [mailto:yehuda@xxxxxxxxxx] 
Sent: Friday, September 18, 2015 11:29 PM
To: Zhou, Yuan
Cc: Ceph Development
Subject: Re: nginx for rgw fcgi frontend

On Thu, Sep 17, 2015 at 11:38 PM, Zhou, Yuan <yuan.zhou@xxxxxxxxx> wrote:
> Hi Yehuda,
>
> I was trying to do some tests on nginx over rgw and ran into some issue on the PUT side:
>
> $ swift upload con ceph_fuse.cc
> Object PUT failed: http://localhost/swift/v1/con/ceph_fuse.cc 411 Length Required   MissingContentLength
>
> However the GET/HEAD/POST requests are all working. From the history mail in ceph-user nginx should be working well. There's no such issue if switch to civetweb frontend. Is there anything changed in fcgi frontend? I'm testing on the master branch.
>
> here's the request log and the CONTENT_LENGTH is there actually.
>
> http://paste2.org/YDJFYIcp
>
>

What version are you running? Note that you're getting an HTTP_CONTENT_LENGTH header instead of CONTENT_LENGTH header. There should be some support for it, but on the other hand there now, but maybe you can get nginx to send the appropriate header?

Yehuda


>
> rgw part of ceph.conf
> ....
>         rgw frontends = fastcgi
>         rgw dns name = localhost
>         rgw socket path = /var/run/ceph/ceph.radosgw.gateway.fastcgi.sock
>         rgw print continue = false
> ...
>
>
> Nginx site.conf:
>
> server {
>     listen 80;
>
>     client_max_body_size 10g;
>
>     access_log /dev/stdout;
>     error_log /dev/stderr;
>
>     location / {
>         fastcgi_pass_header Authorization;
>         fastcgi_pass_request_headers on;
>
>         if ($request_method = PUT) {
>             rewrite ^ /PUT$request_uri;
>         }
>
>         include fastcgi_params;
>
>         fastcgi_pass unix:/var/run/ceph/ceph.radosgw.gateway.fastcgi.sock;
>     }
>
>     location /PUT/ {
>         internal;
>
>         fastcgi_pass_header Authorization;
>         fastcgi_pass_request_headers on;
>
>         include fastcgi_params;
>         fastcgi_param CONTENT_LENGTH $content_length;
>         fastcgi_param HTTP_CONTENT_LENGTH $content_length;
>
>         fastcgi_pass unix:/var/run/ceph/ceph.radosgw.gateway.fastcgi.sock;
>     }
> }
>
>
>
> Sincerely, Yuan
>
��.n��������+%������w��{.n����z��u���ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux