Hi Ivy,

On 09/02/2017 11:53 PM, ivy wrote:
>   location / { 
>     try_files $uri $uri/ =404; 
>     auth_basic "restricted content"; 
>     auth_basic_user_file "/home/secure/.passwords"; 
>     auth_request_set $auth_status $upstream_status; 
> 
>      proxy_pass http://127.0.01:$rp_port 
>   } 

The above try_files directive would return only the files & directories
that are present withing the document_root. Any other request would meet
a 404 error. The requests do not seem to reach the proxy_pass.

If all requests are to be served by the proxy_pass, I suggest
commenting/removing the try_files directive. E.g.

  location / {

    auth_basic "restricted content";
    auth_basic_user_file "/home/secure/.passwords";
    auth_request_set $auth_status $upstream_status;

    proxy_pass http://127.0.01:$rp_port;
  }     

Regards,

Ish Sookun
_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to