Nginx & Digest authentication

Arun John (arujohn) arujohn at
Tue Aug 11 13:29:48 UTC 2015


Thanks for the suggestion. I tried using proxy_pass, but it didn¹t help

Please find my settings

upstream my_backend {

location / {

proxy_pass              http://my_backend;

proxy_set_header          Host               $host;
proxy_set_header          X-Real-IP          $remote_addr;
proxy_set_header          X-Forwarded-For    $proxy_add_x_forwarded_for;
proxy_set_header          X-Forwarded-Proto  http;
proxy_pass_request_headers on;

           if ($request_method = GET ) {
              rewrite ^/(perf-log-.+)$ /uploads/perf/$1 break;
              root /opt/test/files;



Is there any issue with my configs?


On 8/11/15, 6:39 PM, "nginx on behalf of Maxim Dounin"
<nginx-bounces at on behalf of mdounin at> wrote:

>On Tue, Aug 11, 2015 at 03:35:19AM +0000, Arun John (arujohn) wrote:
>> I have a NGINX that sits in front of my application. I have
>> digest authentication enabled for the application. I¹d like a
>> set up where when a user connects to NGINX using Digest, NGINX
>> simply proxies this request to my application where the actual
>> authentication happens. The authentication logic is already
>> available in the application and I just want the NGINX to
>> forward the headers correctly to the app.
>> Could someone help me on how to accomplish this?
>Just use proxy_pass, see
>Maxim Dounin
>nginx mailing list
>nginx at

More information about the nginx mailing list