Reputation: 31
At the moment we run a simple Apache reverse proxy to hide our internal hostname from front end users:
ProxyPass /webapp https://webserver.internal:443/webapp
ProxyPassReverse /webapp https://webserver.internal:443/webapp
On the webserver.internal apache instance, we have:
<Connector port="443" protocol="org.apache.coyote.http11.Http11Protocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
...
proxyName="companysite.com"
proxyPort="443"
...
/>
The user would access our webapp via
https://companysite.com:443/webapp/abc?wdsl
When we are handing URLs back to the user, urls such as:
https://webserver.internal:443/webapp/abc.xsd
is presented as:
https://companysite.com:443/webapp/abc.xsd
What would be the equivalent setup under liberty? I wasn't able to find anything relevant in the httpEndPoint property.
Thanks!
Upvotes: 3
Views: 595
Reputation: 472
Based on Liberty documentation for Using Liberty behind a proxy server this is handled using X-Forwarded-*
headers.
A proxy or a load balancer can be configured to provide the Forwarded or X-Forwarded-* request headers. WebSphere Liberty will only utilize the Forwarded “for” (the “for” parameter can optionally include the port), “host” and “proto” parameters, or also X-Forwarded-For, X-Forwarded-Port, X-Forwarded-Host, and X-Forwarded-Proto headers. Note that the Forwarded “by” parameter or the X-Forwarded-By header is not used.
Apache example for your situation
ProxyPreserveHost On
X-Forwarded-Proto: https
X-Forwarded-Port: 443
ProxyPreserveHost On
is supplying X-Forwarded-Host: companysite.com
- an equivalent to proxyName="companysite.com"
Upvotes: 0
Reputation: 17886
WebSphere uses private header fields $WSRA and $WSRP to form self-referential URLs (remote address and remote port, respectively).
These are set by WebSphere-aware proxy servers, including the "WAS WebServer Plug-in" that runs in Apache. The vars can also be set manually in generic proxy servers.
Upvotes: 1