0

We are trying to setup the Worklight Server for production, which is behind a reverse proxy that will help manage the SSL certificate.

What this means is that, when the user hit the domain, say https://mydomain.com:443, the proxy will automatically forward the request to the Worklight Server on port 9080.

After the setup is done for the reverse proxy following this guide, the installers.html page is working well. However we notice that when we try to access the console using https://mydomain.com:443/appcenterconsole, the user gets redirect to http://mydomain.com:9080/appcenterconsole/console.html instead and this is causing problem.

I searched around and found this link Worklight Console redirects to port 9080, which is similar to the problem i'm having. Is there a way for me to configure the Websphere Liberty Profile so that it will use the reverse proxy URL as the redirection URL?

I notice also that the index.html file in the appcenterconsole.war is using the meta refresh method to do the redirection. I'm tempted to change it to use a full URL, but then i also notice that the same issue happens when we go to the login.html and perform login. (Whereby after login, the page redirects the user with the 9080 port as well).

Any pointers or idea are welcomes. The Worklight version used is 6.1.

Thank you.

EDIT

The network setup in my environment:

Proxy Gateway (with SSL cert) configured to connect to Worklight Server for port 9080 whenever a connection with port 80 or 443 is received. Therefore:

https://mydomain.com:443/appcenterconsole -> will be mapped to http://worklightserver:9080/appcenterconsole

The mapping is done internally between the proxy and the worklight server.

When we type the full URL on the browser, ie. https://mydomain.com:443/appcenterconsole/console.html after i login, the console works fine.

Community
  • 1
  • 1
ipohfly
  • 1,959
  • 6
  • 30
  • 57
  • Please do not confuse worklight console with application center - these are 2 separate entities. – Idan Adar Apr 15 '14 at 04:49
  • Yes i understand, but the problem is similar. Is there a way to configure this? Thanks. – ipohfly Apr 15 '14 at 05:04
  • What proxy do you use? It seems a problem in the proxy configuration. The proxy should masquerade the incoming request so that it can translate outgoing responses. The translation of outgoing responses seems to work for the IP address itself but not for the port. That is, the response reaches the browser with a wrong port in the header, hence the browser redirects wrongly. It is the responsibility of the reverse proxy to ensure the IP and port translation. – Georg Sander Apr 15 '14 at 17:40
  • The proxy settings seems fine as we are able to access the service via the mobile client, and download apps normally. From my observation, it is when the console tries to perform redirection (i.e. after login, redirect you to the main app page) that is giving problem. – ipohfly Apr 16 '14 at 04:02
  • Tests made with Liberty Profile 8551 and IBM HTTP Server 855 don't show this problem. Entering https://domain:443/appcenterconsole redirects correctly to https://domain:9443/appcenterconsole/login.html. Be sure that the proxy doesn't redirect to the http protocol. By default for example with IHS, the transport between IHS and the application server is HTTP and not HTTPS – Bruno Charpentier Apr 16 '14 at 09:54
  • what we neeeded is that it stays with the public domain, i.e. in your example, it will be to stay at domain:443/appcenterconsole rather than be redirected to domain:9443/appcenterconsole. This is because the SSL layer is handled by the proxy server, and there's no SSL cert configured for the worklight server. – ipohfly Apr 17 '14 at 03:29
  • @GeorgSander your points seems valid, unfortunately i'm not that experienced with network configuration, could you elaborate a bit on what is the translation means? thanks. – ipohfly Apr 17 '14 at 03:41
  • Can you please tell me from where did u download Tandem appcenterconsole.war file , I am not able to find cource – garg Apr 04 '17 at 04:45

1 Answers1

2

Have you set up the JNDI entries detailed here?

http://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/index.jsp?topic=%2Fcom.ibm.worklight.installconfig.doc%2Fappcenter%2Fr_ac_appres_endpoint.html

jiachen
  • 41
  • 3
  • ya i did setup the JNDI entries there, the application center RESTful service is working well, just that when it tries to do the normal redirection (i.e. after login, redirect you to the main app page) it will give problem – ipohfly Apr 16 '14 at 04:00
  • Could yo please tell me from where we can get applcationcenter.war file . I amn not able to find. Thanks – garg Apr 04 '17 at 05:01