Access Wildfy Remotely via Web Browser

Posted on

This article is specifically written to describe how to access a management console of Wildfly version 10 from a Web Browser remotely. Access Wildfly Remotely via Web Browser means the service of Java Application Server reside in another server. So, in order to be accessed, the Wildfly Java Application Server must be configured further so that it can be accessed remotely.

By default, Wildfly Java Application Server start locally and can only accept incoming request locally. So, how an Wildfly Java Application Server configured so that it can be accessed remotely ?. Below are steps which is considered an important thing be done or to be executed in order for a Wildfly Java Application Server can be accessed remotely :

1. Edit file host.xml which is normally located at the configuration folder. For an example, if the root folder of Wildfly Java Application server is locate in /opt/wildfly-10.1.0.Final/, the host.xml file will be located at /opt/wildfly-10.1.0.Final/domain/configuration. Pay attention to the following snippet code of configuration :

<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
</interfaces>

Change it into the following snippet code of configuration :

<interfaces>
<interface name="management">
<any-address />
</interface>
<interface name="public">
<any-address />
</interface>
<!--
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
-->
</interfaces>

The above snippet code of configuration actually is modified by commenting several snippet code of configurations with the default address of localhost ( 127.0.0.1) server location. So, it will disable or deactivate access to Wildfly Java Application Server only from local address. On the other hand, add additional snippet code of configuration which defines access from any address available in the server. It is specified in the following additional lines :

<interface name="management"> 
<any-address /> 
</interface> 
<interface name="public"> 
<any-address /> 
</interface>

2. Edit another configuration file named standalone.xml which is located at standalone/configuration. Supposed if the location of Wildfly Java Application Server located at /opt/wildfly-10.1.0.Final/ then the overall full path will be in /opt/wildfly-10.1.0.Final/standalone/configuration/standalone.xml. Basically, it has the same snippet code with the previous one stated in the first step :

<interfaces>
<interface name="management">
<any-address/>
</interface>
<interface name="public">
<any-address/>
</interface>
</interfaces>

3. Don’t forget to restart the Wildfly Java Application Server to be able to perform on accessing Wildfly Java Application Server remotely. It can be achieved by executing the following command :

sh standalone.sh -b=0.0.0.0 &

Description : 
sh : It is a command interpreter which is used to execute a command specified after 
standalone.sh : It is the name of the file which is going to be executed. It is the shell script for starting JBoss Wildfly Java Application Server
-b=0.0.0.0 : It is an additional parameter specified to start JBoss Wildfly Java Application Server with broadcast address of 0.0.0.0. It means, the service can listen on any available network devices defined with any address exist. 

This is the image showing the default page of Wildfly Java Application Server :

Access Wildfy Remotely via Web Browser
Access Wildfy Remotely via Web Browser

The following image is depicting a page of Administration Console shown whenever an account used for accessing Administration Console hasn’t been created yet :

Access Wildfy Remotely via Web Browser
Access Wildfy Remotely via Web Browser

And the following image is an image showing aan authentication dialog box for accessing JBoss Wildfly Management Console :

The following is the image of the authentication dialog box in detail :

If the authentication process has successfully carried out, the following is the image of Wildfly Management Console :

As we can see from the above images, especially in the URL Address Bar of the web browser used to access Wildfly Java Application Server Management Console, it is not a localhost address instead it is a remote URL address the URL of http://192.168.100.11 for an example.

Leave a Reply