0
votes

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.

1
Please do not confuse worklight console with application center - these are 2 separate entities.Idan Adar
Yes i understand, but the problem is similar. Is there a way to configure this? Thanks.ipohfly
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
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
Tests made with Liberty Profile 8551 and IBM HTTP Server 855 don't show this problem. Entering domain:443/appcenterconsole redirects correctly to 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 HTTPSBruno Charpentier

1 Answers