Set the default host name of a Liberty server
We can add the defaultHostName variable to the server.xml file to set the default host name by which a Liberty server is identified.
This variable is available for use by service configurations. Set this value is particularly important for multihomed systems (with multiple NICs and multiple mapped host names for example).
Notes:
- This variable is currently used by the <httpEndpoint> host attribute and the <hostAuthInfo> rpcHost attribute
- The default host name must be the fully qualified host name of the system.
- The value must not contain any wildcards (* for example).
- The variable default is localhost.
To set the default host name by which a Liberty server is identified, add the defaultHostName variable to the server.xml file. For example:
<variable name="defaultHostName" value="localhost" />