Setting a URL prefix for the Glassfish admin GUI

116 views
Skip to first unread message

DC Cothren

unread,
Jan 16, 2019, 5:01:22 PM1/16/19
to Payara Forum

The Glassfish admin gui runs on port 4848, which is behind my firewall. Other high order port web apps either have a consistent prefix or allow me to set one in order to proxy from 443 to the higher order port. For instance Jenkins is running on 9009 on the same server, but I can rely on /jenkins being the prefix to all traffic there.  The Glassfish admin gui has no such consistency. I've seen /theme/common/resource, etc. 

Is there a way to set a prefix for the Glassfish admin gui?

HASUNUMA Kenji

unread,
Jan 17, 2019, 1:59:56 AM1/17/19
to Payara Forum
Hello,

I have no idea without using reverse proxy in front of admin gui.
Maybe, Anyone else have a good idea.

Thanks,
Kenji


2019年1月17日木曜日 7時01分22秒 UTC+9 DC Cothren:

Ondro Mihályi

unread,
Jan 17, 2019, 9:46:33 AM1/17/19
to Payara Forum
Hi,

Payara Server Admin GUI is a standard web application like any other application deployed to the server but it's just deployed as system application, which means that you can't configure it by standard methods. By default, it is bound to the virtual server named __admingui and to an empty (root) context root. There's no supported option to modify the context root of that app.

Although it's possible do change the context root of the app by editing domain.xml file directly, the application expects to run with an empty context root and fails to load. It would require some tweaks to make it run on a non-empty context root.

If you want to explore, you can see the configuration of the admin GUi app in domain.xml (you first need to start the server and load the admin GUI in browser to see it):

<system-applications>
    <application context-root="" object-type="system-admin" name="__admingui" directory-deployed="true" location="${com.sun.aas.installRootURI}/lib/install/applications/__admingui">
      <module name="__admingui">
        <engine sniffer="web"></engine>
        <engine sniffer="security"></engine>
      </module>
    </application>
  </system-applications>

As I wrote, you can try changing the context-root value but the app will fail to load because it redirects to a worng URL.

Ondro
Reply all
Reply to author
Forward
0 new messages