openstack swift as a cache proxy for nginx, swift proxy report 401 error when authenticate

Andrew Hutchings ahutchings at nginx.com
Wed Mar 2 09:12:58 UTC 2016


Hi Amy,

On 02/03/16 03:19, AmyAmy wrote:
> hello, everybody.
>
> I have search for the answer on the internet, and referent this solution:
> https://forum.nginx.org/read.php?2,250458,250463#msg-250463
>
> Then ,I change my nginx configuration like this:

> server {
>          listen       80;
>          server_name  localhost;
>          location / {
>              root   html;
>              index  index.html index.htm;
>              auth_request /auth/v1.0;
>          }
>          location /auth/v1.0 {
>                  proxy_pass      http://192.168.1.1:8080;
>                  proxy_pass_request_body off;
>                  proxy_set_header Content-Length "";
>                  proxy_set_header X-Original-URI $request_uri;
>          }
> }
>

[trimmed much of the email]

Have you tried looking at your swift logs when NGINX passes on the 
request? I suspect this will give a good indication as to what is wrong.

In addition you probably need to set the following, although I'm 
uncertain as to whether it will fix your problem:

proxy_http_version 1.1

Kind Regards
-- 
Andrew Hutchings (LinuxJedi)
Technical Product Manager, NGINX Inc.



More information about the nginx mailing list