带有LDAP的Apache无法进行身份验证和转发

带有LDAP的Apache无法进行身份验证和转发,apache,ldap,haproxy,proxypass,Apache,Ldap,Haproxy,Proxypass,我已经在机器上配置了Apache,并使用LDAP授权代理实际应用程序 例如,Apache中的表单_auth.conf如下所示 <Location /myapp/home/j_security_check> ErrorDocument 401 /myapp/home/login.jsp AuthType form AuthName form_auth SetHandler form-login-handler LDAPReferrals Off

我已经在机器上配置了Apache,并使用LDAP授权代理实际应用程序

例如,Apache中的表单_auth.conf如下所示

 <Location /myapp/home/j_security_check>
    ErrorDocument 401 /myapp/home/login.jsp
    AuthType form
    AuthName form_auth
    SetHandler form-login-handler
    LDAPReferrals Off
    AuthFormProvider ldap
    AuthLDAPURL "ldaps://details"
    AuthLDAPBindDN “details"
    AuthLDAPBindPassword “a£456&89"
    AuthFormLoginSuccessLocation http://10.1.5.55:8080/myapp/
    Session On
    SessionCookieName mysession path=/
    SessionCryptoPassphrase secretpass
    SessionCryptoCipher aes128
    SessionMaxAge 1800
    Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure
    Require valid-user
    Order allow,deny
    Allow from all
    AuthFormFakeBasicAuth On
</Location>
<LocationMatch "^/(myapp)">
        AuthFormProvider ldap
        AuthLDAPURL     "ldaps:details"          
        AuthLDAPBindDN "CN=UNIX TEST0 SZ Service Account,OU=Environments,OU=User,OU=Delegated,DC=test,DC=LOCAL"
        AuthLDAPBindPassword "a£456&89"
        AuthType form
        AuthName form_auth
        AuthFormLoginRequiredLocation http://10.1.5.55/myapp/home/login.jsp
        Session On
        SessionCookieName mysession path=/
        SessionCryptoPassphrase secretpass
        SessionCryptoCipher aes128
        SessionMaxAge 1800
        Require valid-user
        Order allow,deny
        Allow from all
        AuthFormFakeBasicAuth On
</LocationMatch>
ProxyPass /myapp http://10.1.5.55:8080/myapp max=480 retry=0 keepalive=On
ProxyPassReverse /myapp http://10.1.5.55:8080/myapp

ErrorDocument 401/myapp/home/login.jsp
AuthType表单
AuthName表单_auth
SetHandler表单登录处理程序
LDAPReferrals关闭
AuthFormProvider ldap
AuthLDAPURL“ldaps://details"
AuthLDAPBindDN“详细信息”
AuthLDAPBindPassword“a£456&89”
AuthFormLoginSucessLocationhttp://10.1.5.55:8080/myapp/
关于
sessionokiename mysession路径=/
SessionCryptoPassphrase secretpass
会话密码aes128
课时课税1800
标题编辑集Cookie^(.*)$$1;仅HttpOnly;安全
需要有效用户
命令允许,拒绝
通融
AuthFormFakeBasicAuth On
AuthFormProvider ldap
AuthLDAPURL“ldaps:详细信息”
authldappbinddn“CN=UNIX TEST0 SZ服务帐户,OU=Environments,OU=User,OU=Delegated,DC=test,DC=LOCAL”
AuthLDAPBindPassword“a£456&89”
AuthType表单
AuthName表单_auth
AuthFormLoginRequiredLocationhttp://10.1.5.55/myapp/home/login.jsp
关于
sessionokiename mysession路径=/
SessionCryptoPassphrase secretpass
会话密码aes128
课时课税1800
需要有效用户
命令允许,拒绝
通融
AuthFormFakeBasicAuth On
ProxyPass/myapphttp://10.1.5.55:8080/myapp 最大值=480重试=0保持激活=打开
ProxyPassReverse/myapphttp://10.1.5.55:8080/myapp
现在,我从本地机器在端口9090上创建了一个隧道,连接到端口8080上的Apache服务器

在浏览器中键入“”时

显示Apache index.html页面,我可以看到Apache服务器上的日志。当我尝试访问localhost:9090/myapp时,我可以看到浏览器url更改为10.1.5.55:8080/myapp/home/login.jsp,但没有响应和超时

在Apache错误日志(访问Apache的第一个URL)上,我的日志如下

 <Location /myapp/home/j_security_check>
    ErrorDocument 401 /myapp/home/login.jsp
    AuthType form
    AuthName form_auth
    SetHandler form-login-handler
    LDAPReferrals Off
    AuthFormProvider ldap
    AuthLDAPURL "ldaps://details"
    AuthLDAPBindDN “details"
    AuthLDAPBindPassword “a£456&89"
    AuthFormLoginSuccessLocation http://10.1.5.55:8080/myapp/
    Session On
    SessionCookieName mysession path=/
    SessionCryptoPassphrase secretpass
    SessionCryptoCipher aes128
    SessionMaxAge 1800
    Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure
    Require valid-user
    Order allow,deny
    Allow from all
    AuthFormFakeBasicAuth On
</Location>
<LocationMatch "^/(myapp)">
        AuthFormProvider ldap
        AuthLDAPURL     "ldaps:details"          
        AuthLDAPBindDN "CN=UNIX TEST0 SZ Service Account,OU=Environments,OU=User,OU=Delegated,DC=test,DC=LOCAL"
        AuthLDAPBindPassword "a£456&89"
        AuthType form
        AuthName form_auth
        AuthFormLoginRequiredLocation http://10.1.5.55/myapp/home/login.jsp
        Session On
        SessionCookieName mysession path=/
        SessionCryptoPassphrase secretpass
        SessionCryptoCipher aes128
        SessionMaxAge 1800
        Require valid-user
        Order allow,deny
        Allow from all
        AuthFormFakeBasicAuth On
</LocationMatch>
ProxyPass /myapp http://10.1.5.55:8080/myapp max=480 retry=0 keepalive=On
ProxyPassReverse /myapp http://10.1.5.55:8080/myapp
AH01502:标头:ap_标头_输出_筛选器()

[authz_core:debug][pid 26517]mod_authz_core.c(802):[client 10.6.1.10:55334]AH01626:授予所有请求的授权结果:授予
[authz_core:debug][pid 26517]mod_authz_core.c(802):[client 10.6.1.10:55334]AH01626:的授权结果:已授予
[authz_core:debug][pid 26517]mod_authz_core.c(802):[client 10.6.1.10:55334]AH01626:请求所有授权的授权结果:授权
[authz_core:debug][pid 26517]mod_authz_core.c(802):[client 10.6.1.10:55334]AH01626:的授权结果:已授予
当我尝试访问我的应用程序时,我会收到此日志并超时

mod_authz_core.c(802): [client 10.6.1.10:55347] AH01626: authorization result of Require valid-user : denied (no authenticated user yet)

[authz_core:debug] [pid 26518] mod_authz_core.c(802): [client 10.6.1.10:55347] AH01626: authorization result of <RequireAny>: denied (no authenticated user yet)

[core:debug] [pid 26518] util_cookies.c(59): [client 10.6.1.10:55347] AH00007: ap_cookie: user '(null)' set cookie: 'myapp2session=3x/IdXV5SmKhepiUQ8kUSLw/6Dwv9vxc97x78JhsOZrGF2Tx8Y5TnH7uf0fOfI2+czX3ZB6m92dJSlMttrX1VA==;Max-Age=1800;path=/'

[headers:debug] [pid 26518] mod_headers.c(848): AH01503: headers: ap_headers_error_filter()

[core:info] [pid 26514] [client 10.6.1.10:55348] AH00128: File does not exist: /var/www/html/myapp/home/login jsp
mod_authz_core.c(802):[client 10.6.1.10:55347]AH01626:要求有效用户的授权结果:拒绝(尚未认证用户)
[authz_core:debug][pid 26518]mod_authz_core.c(802):[client 10.6.1.10:55347]AH01626:的授权结果:拒绝(尚未验证用户)
[core:debug][pid 26518]util_cookies.c(59):[client 10.6.1.10:55347]AH00007:ap_cookie:user'(null)“set cookie:'myapp2session=3x/IdXV5SmKhepiUQ8kUSLw/6Dwv9vxc97x78JhsOZrGF2Tx8Y5TnH7uf0fOfI2+czx3zb6m92djsllmttrx1va=”;最大年龄=1800;路径=/'
[headers:debug][pid 26518]mod_headers.c(848):AH01503:headers:ap_headers\u error\u filter()
[core:info][pid 26514][client 10.6.1.10:55348]AH00128:文件不存在:/var/www/html/myapp/home/login-jsp
我将显示表单输出

我的配置中缺少什么,因为这是一个在不同环境中工作的配置