2
votes

I am using Websphere Liberty 8.5.5 with IBM HTTP Server 8.5.5 and Worklight Server 6.0.0.1.

I have configured IHS to redirect port 80 to Websphere port 9080.

The redirection works properly for the front page, and entering domain.com/worklight/console directly opens domain.com:9080/worklight/console page. However, when I provide the credentials and click Login, the address bar changes to domain.com:9080/worklight/console page which should not happen as port 9080 is blocked over the firewall.

I have applied the solutions given in this question "Mixed Port Numbers" but still the problem persists.

If I manually remove 9080 from the address bar and press enter, the page opens fine, is it possible that the port 9080 has been hard coded somewhere in the Authentication Console, if yes, where should I make that change?

I used WebSphere Plugin to internally forward the requests on port 80 to WebSphere port 9080.

worklight.properties

publicWorkLightHostname=subdomain.domain.com
publicWorkLightProtocol=http
publicWorkLightPort= 

Plugin-Cfg.xml

<VirtualHostGroup Name="default_host">  <VirtualHost Name=":9080"/> 
<VirtualHost Name=":80"/>  <VirtualHost Name="*:9443"/> 
</VirtualHostGroup>  <Transport Protocol="http" Port="9080"
Hostname="11.11.11.11"/> <Transport Protocol="https" Port="9443"
Hostname="11.11.11.11">

Appreciate any ideas!

2
Are you really doing an HTTP redirect from 9080 to 80, or are you using the WebSphere plugin to cause IHS to internally forward requests on 80 to WebSphere port 9080?dbreaux
@dbreaux I used WebSphere Plugin to internally forward the requests on port 80 to WebSphere port 9080. publicWorkLightHostname=subdomain.domain.com # http or https publicWorkLightProtocol=http # For default port leave empty publicWorkLightPort= <VirtualHostGroup Name="default_host"> <VirtualHost Name=":9080"/> <VirtualHost Name=":80"/> <VirtualHost Name="*:9443"/> </VirtualHostGroup> <Transport Protocol="http" Port="9080" Hostname="11.11.11.11"/>-<Transport Protocol="https" Port="9443" Hostname="11.11.11.11">eshaa
Ok, so the WAS virtual host is listening on both 9080 and 80, but something is causing the application to generate self-referential URLs with the 9080 port, correct?dbreaux
@dbreaux yes exactly! But the application PUBLIC view is fine, only the ADMIN CONSOLE is redirecting like that.eshaa
Oh, right. In my experience, there's nothing you can do about the admin console redirecting back to its own port. If you don't want its port open in the firewall, but you do want to be able "punch through" to it, you can tunnel over SSH.dbreaux

2 Answers

1
votes

You need edit the server.xml (if you're using Liberty) to modify 2 elements:

jndiName="worklight/publicWorkLightProtocol" 

and

jndiName="worklight/publicWorkLightPort"   

to make their values same as what defined in worklight properties.

0
votes

I'm looking at the infocenter, and it looks like Transport is supposed to be wrapped in ServerCluster -> Server.

How did you generate your plugin-cfg.xml?