Igor Sysoev Wrote:
>
> You should
> 1) use either the same user/password on both nginx
> and Apache,
It's not possible in my situation. NGINX uses basic auth based on a file, while Apache uses basic auth through LDAP.
> 2) or enable authentication only on one host: on
> nginx OR Apache,
I can't because I need two layer of authentication. The first one on NGINX and the second one on the web apps with authentication based on our LDAP server.
> 3) or enable authentication on nginx and go to
> Apache as some
> backend user:
>
> proxy_set_header Authorization
> base64_encoding_of_"user:password";
>
This is not my case.
So, is there a way to tell NGINX to manage only the first authentication level and when the user provides username/password (LDAP) for the backend web app, these credentials must be managed by the backend web server?
Another solution may be to keep on the backend the LDAP auth and on the frontend (NGINX) a form based authentication?
Thanks, Simone Saravalli