auth_request and apache 2 with kerberos

Luca Manganelli luca.manganelli at
Sun Nov 14 16:02:07 UTC 2021


I have this configuration:

 - a docker with nginx
 - an apache2 server with kerberos authentication configured.

nginx is the main http server (everyone in internet navigate into it). When
the user clicks on the "LOGIN" from the website, nginx should use the
apache2 as authentication since it connects to our Active Directory for

I have tried to use the auth_request directive, but the problem is that
when it goes to apache2, the dialog box requesting user/password never pop
ups and so it returns to nginix with 403 not authorized error.

(If I go directly to apache2 server, it popus the dialog box and I can
succeed with the authentication).

Nginx configuration is as follows:

        location /login2/ {
            auth_request /auth;

        location = /auth {
            proxy_pass http://apache2server/;
            proxy_pass_request_body off;

What am I missing?


Comune di Trento 

via Belenzani, 19 - 38122 Trento | C.F e P. IVA: 

tel. +39 0461.884111 | 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list