atomx / nginx-http-auth-digest

Digest Authentication for Nginx
Other
44 stars 14 forks source link

A tip for others - URL on server must match what client requested #22

Open paulharris opened 4 years ago

paulharris commented 4 years ago

I was passing through an nginx server (HOST), into a virtual machine running another nginx (VM).

The VM did the digest authentication, but I had changed the url during the proxy_pass. ie HOST's configuration was proxy_pass http://VM/;

ie HOST saw url as /test/page.html and VM saw the url as /page.html

This broke the digest calc, which includes the URL of the request. So I adjusted the proxy_pass to http://VM/test/; and then the digest matched.