2

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!

Community
  • 1
  • 1
eshaa
  • 537
  • 1
  • 4
  • 14
  • 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 Nov 19 '13 at 13:49
  • @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= - – eshaa Nov 20 '13 at 07:03
  • 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 Nov 20 '13 at 12:55
  • @dbreaux yes exactly! But the application PUBLIC view is fine, only the ADMIN CONSOLE is redirecting like that. – eshaa Nov 21 '13 at 07:19
  • 1
    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 Nov 22 '13 at 01:37

2 Answers2

1

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.

Alexander Vogt
  • 17,879
  • 13
  • 52
  • 68
Jeff Cai
  • 13
  • 3
0

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?

David Dhuyveter
  • 1,416
  • 9
  • 17
  • Hi David, I generated the Plugin-cfg by using both MBEANS and the Websphere Customization Tool. For Application Deployment, I used Ant Scripts, which come as templates with Worklight. – eshaa Nov 21 '13 at 07:24