gpt4 book ai didi

apache - Pentaho + apache 反向代理 + 代理 SSL 集成

转载 作者:行者123 更新时间:2023-11-28 22:16:32 32 4
gpt4 key购买 nike

我在将 pentaho docker 容器合并到我们的内部基础设施时遇到问题。

概述:域代理正在监听端口 443(处理 SSL 和 LDAP 身份验证),并将流量重定向到 apache 反向代理(在具有覆盖网络的群中作为 docker 服务)。反向代理正在将请求重定向到 pentaho 容器(也与反向代理在同一个 swarm 中的 docker 服务)。

配置:(仅相关行)域代理(不由我们管理):监听 443 并重定向到反向代理 docker 容器反向代理:听80

<VirtualHost    *:80>
ServerAlias reverse-proxy
ServerName reverse-proxy
#pentaho redirect
<Location "/application/pentaho">
ProxyPass "ajp://pentaho_host:8009/application/pentaho" ttl=480
ProxyPassReverse "ajp://pentaho_host:8009/application/pentaho"
</Location>

Pentaho 容器:

Pentaho 使用以下设置在更改的上下文中运行:

system/server.properties 文件:

fully-qualified-server-url=https://example.com/application/pentaho

Tomcat 配置:

tomcat/conf/server.xml:

<Connector URIEncoding="UTF-8" port="8009" protocol="AJP/1.3" redirectPort="8443"
#Without ProxyName and ProxyPort tomcat redirects all app buttons to http://localhost:8009/
ProxyName="example.com"
ProxyPort="443" />

上下文变化

<Host name="localhost"  appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Context path="/application/pentaho" debug="0" docBase="pentaho" />
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t &quot;%r&quot; %s %b" />
</Host>

这里的问题是,当我访问 https://example.com/application/pentaho 时, 我得到 pentaho 登录页面 ( https://example.com/application/pentaho/Login ),在我使用正确的凭据登录后,我再次被重定向到相同的登录页面(使用;JSESSION 32IBN4O1I23N21OI3 ...),但是在控制台中我可以看到登录后,请求通过了 j_spring_security_check(HTTP 302 OK),然后它到达 https://example.com/application/pentaho/Home ....(也发现了 HTTP 302)然后返回登录...

访问日志:

x.x.x.x - - [21/Sep/2017:15:11:49 +0000] "GET /application/pentaho/Login HTTP/1.1" 200 7208
x.x.x.x - - [21/Sep/2017:15:11:49 +0000] "GET /application/pentaho/webcontext.js HTTP/1.1" 200 4472
x.x.x.x - - [21/Sep/2017:15:11:49 +0000] "GET /application/pentaho/content/sparkl/resources/sparkl-require-js-cfg.js HTTP/1.1" 200 1525
x.x.x.x - - [21/Sep/2017:15:11:49 +0000] "GET /application/pentaho/content/client-config-folder-enabler/client-config-enabler-require-js-cfg.js HTTP/1.1" 200 1019
x.x.x.x - - [21/Sep/2017:15:11:49 +0000] "GET /application/pentaho/js/themes.js HTTP/1.1" 200 1346
x.x.x.x - - [21/Sep/2017:15:11:49 +0000] "GET /application/pentaho/CacheExpirationService HTTP/1.1" 200 1161
x.x.x.x - - [21/Sep/2017:15:11:52 +0000] "POST /application/pentaho/j_spring_security_check HTTP/1.1" 302 -
x.x.x.x - - [21/Sep/2017:15:11:52 +0000] "GET /application/pentaho/Home;jsessionid=09D72F59187B02D027D4313EBDA645EA HTTP/1.1" 200 4928
x.x.x.x - - [21/Sep/2017:15:11:52 +0000] "GET /application/pentaho/Home?locale=en_US HTTP/1.1" 302 -
x.x.x.x - - [21/Sep/2017:15:11:52 +0000] "GET /application/pentaho/Login;jsessionid=B9B10CD32A3CD832C87243A5610C3B09 HTTP/1.1" 200 7301
x.x.x.x - - [21/Sep/2017:15:11:52 +0000] "GET /application/pentaho/webcontext.js HTTP/1.1" 200 4472

一遍又一遍……

你们知道这里可能配置错误的是什么吗?

最佳答案

您需要添加 pentaho 风格的反向代理指令:

<Location "/application/pentaho-style">
ProxyPass "ajp://pentaho_host:8009/application/pentaho-style" ttl=480
ProxyPassReverse "ajp://pentaho_host:8009/application/pentaho-style"
</Location>

瞧! :D

关于apache - Pentaho + apache 反向代理 + 代理 SSL 集成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46349544/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com