WebSphere Portal behind reverse proxy and getServerPort()

馋奶兔 提交于 2019-12-03 21:19:27

Because I can answer my own questions, here's what the problem was:

At server-side, portlets and JSPs in WebSphere Portal use request.getServerHost() and request.getServerPort(). To make these methods work behind reverse proxy (which sends Host: header). I had to add:

ProxyPreserveHost On

to apache configuration and:

com.ibm.ws.webcontainer.extractHostHeaderPort = true
trusthostheaderport = true

additional properties to Web Container in IBM Console: WebSphere application servers -> WebSphere_Portal -> Web Container Settings -> Web Container -> Custom properties.

These properties are described here.

I got the same problem few days ago and eventually chose the apache mod_substitute to change these urls with something like this:
Substitute "s|http ://backend-server:10039/|/|i"

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!