【问题标题】:Nginx as load balancer for application using KerberosNginx 作为使用 Kerberos 的应用程序的负载均衡器
【发布时间】:2018-07-05 11:27:34
【问题描述】:

我目前正在使用 nginx 作为位于两个不同服务器上的 tomcat 应用程序的负载平衡器。该应用使用 NTLM 进行身份验证,并且 nginx 工作正常(调用 nginx 地址时会自动登录有效用户)。

现在我想对使用 Kerberos 进行 Windows 身份验证的应用程序执行相同的操作。我正在使用相同的配置(当然是不同的应用程序/IP)测试 nginx,但登录不起作用。我应该使用 kerberos 自动登录,但请求的是运行 nginx 的服务器的用户名和密码:

“需要身份验证”

我需要在我的 nginx 配置中进行哪些更改?或者这不是配置问题?

        worker_processes  1;
        events {
            worker_connections  1024;
        }


        http {
            include       mime.types;
            default_type  application/octet-stream;

            proxy_cache_path /Temp/NGINX_cache/ keys_zone=backcache:10m;

            sendfile        on;
            keepalive_timeout  65;


            upstream myapp {

                hash $remote_addr consistent;

                # List of myapp application servers
                server 10.54.76.7:8080;
                server 10.54.73.8:8080;


            }



            server {
                listen       80;
                server_name  localhost;



                location /myapp/ {
                    proxy_pass http://myapp;
                    proxy_set_header Host            $host;
                    proxy_set_header X-Forwarded-For $remote_addr;

                }


                # Return a temporary redirect to the /tomcat-app/ directory
                # when user requests '/'
                location = / {
                    return 302 /myapp/;
                }



                # redirect server error pages to the static page /50x.html

                error_page   500 502 503 504  /50x.html;
                location = /50x.html {
                    root   html;
                }



                proxy_read_timeout 900s;
                client_max_body_size 5000M;
            }
        }

亲切的问候

亚历克斯

【问题讨论】:

    标签: tomcat nginx single-sign-on kerberos


    【解决方案1】:

    您的 Nginx 安装需要使用 auth_pam 模块构建,这不是标准构建的一部分。

    如果运行 nginx -V 2>&1 | grep -o auth-pam 返回一些东西,那么你很幸运,否则你必须自己重建和添加模块

    【讨论】:

    • 非常感谢!我可能应该提到我在 Windows 系统上使用 nginx。我最初认为如果我在 nginx 级别而不是 webapp 本身上使用身份验证,我只需要那个附加模块。
    猜你喜欢
    • 2013-03-29
    • 2019-05-09
    • 2012-11-10
    • 1970-01-01
    • 2018-02-26
    • 1970-01-01
    • 2021-02-01
    • 2018-10-14
    • 2019-08-24
    相关资源
    最近更新 更多