Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 反向代理和getServerPort()背后的WebSphere Portal_Apache_Websphere_Reverse Proxy_Mod Proxy_Websphere Portal - Fatal编程技术网

Apache 反向代理和getServerPort()背后的WebSphere Portal

Apache 反向代理和getServerPort()背后的WebSphere Portal,apache,websphere,reverse-proxy,mod-proxy,websphere-portal,Apache,Websphere,Reverse Proxy,Mod Proxy,Websphere Portal,我在访问部署在反向代理(使用Apache)后面的WebSpherePortal时遇到问题。问题是,在检查浏览器发出的HTTP请求时,有些请求是针对代理的,有些直接针对WebSpherePortal 我的Apache配置: ProxyPassReverseCookieDomain backend-server proxy-server ProxyPass / http://backend-server:10039/ ProxyPassReverse / http://backend-server

我在访问部署在反向代理(使用Apache)后面的WebSpherePortal时遇到问题。问题是,在检查浏览器发出的HTTP请求时,有些请求是针对代理的,有些直接针对WebSpherePortal

我的Apache配置:

ProxyPassReverseCookieDomain backend-server proxy-server

ProxyPass / http://backend-server:10039/
ProxyPassReverse / http://backend-server:10039/
问题是,一些生成的资源包含绝对URI,目标是后端服务器:10039


我还应该配置什么来正确访问反向代理背后的WebSphere Portal?

因为我可以回答自己的问题,下面是问题所在:

在服务器端,WebSpherePortal中的portlet和JSP使用
request.getServerHost()
request.getServerPort()
。使这些方法在反向代理(发送
Host:
header)之后工作。我必须补充:

ProxyPreserveHost On
要访问apache配置,请执行以下操作:

com.ibm.ws.webcontainer.extractHostHeaderPort = true
trusthostheaderport = true
IBM控制台中Web容器的附加属性:
WebSphere应用程序服务器->WebSphere\u门户->Web容器设置->Web容器->自定义属性


对这些属性进行了描述。

因为我可以回答我自己的问题,下面是问题所在:

在服务器端,WebSpherePortal中的portlet和JSP使用
request.getServerHost()
request.getServerPort()
。使这些方法在反向代理(发送
Host:
header)之后工作。我必须补充:

ProxyPreserveHost On
要访问apache配置,请执行以下操作:

com.ibm.ws.webcontainer.extractHostHeaderPort = true
trusthostheaderport = true
IBM控制台中Web容器的附加属性:
WebSphere应用程序服务器->WebSphere\u门户->Web容器设置->Web容器->自定义属性


这些属性已被描述。

我几天前也遇到了同样的问题,最终选择了apache mod_替代品来更改这些URL,如下所示:

Substitute“s | http://backend server:10039/|/| i”
几天前我遇到了同样的问题,最终选择了apache mod|u Substitute来更改这些URL,如下所示:
替换为“s | http://backend server:10039/|/| i”