[V9.0.1 Nov 2016]

Configuring the HTTP host name

By default, the mqweb server which hosts the IBM® MQ Console and REST API is configured to allow only local connections. That is, the IBM MQ Console and REST API can be accessed only on the system on which the IBM MQ Console and REST API are installed. [V9.0.4 Oct 2017]From IBM MQ 9.0.4, you can configure host name to allow remote connections by using the setmqweb command. In IBM MQ 9.0.3, and earlier, you can configure host name to allow remote connections by editing the mqwebuser.xml file.

Before you begin

You must be a privileged user to complete this procedure.
[V9.0.4 Oct 2017]From IBM MQ 9.0.4,you can view the current configuration of the HTTP host name by using the following command:
dspmqweb properties -a
The httpHost field shows the HTTP host name. For more information, see dspmqweb.
[z/OS][V9.0.4 Oct 2017]Attention:

Before issuing either the setmqweb or dspmqweb commands on z/OS®, you must set the WLP_USER_DIR environment variable, so that the variable points to your mqweb server configuration.

To do this, issue the following command:
export WLP_USER_DIR=WLP_user_directory
where WLP_user_directory is the name of the directory that is passed to crtmqweb.sh. For example:
export WLP_USER_DIR=/var/mqm/web/installation1

For more information, see Create the Liberty server definition.

Procedure

[V9.0.4 Oct 2017] Use one of the following methods to configure the host name:
  • From IBM MQ 9.0.4, use the setmqweb properties command:

    setmqweb properties -k httpHost -v hostName

    where hostName specifies the IP address, domain name server (DNS) host name with domain name suffix, or the DNS host name of the server where IBM MQ is installed. Use an asterisk in double quotation marks to specify all available network interfaces. Use the value localhost to allow only local connections.

  • For IBM MQ 9.0.3 and earlier, edit the mqwebuser.xml file:
    1. Open the mqwebuser.xml file.
      The mqwebuser.xml file can be found in one of the following directories:
      • [UNIX, Linux, Windows]On UNIX, Linux®, and Windows: MQ_DATA_DIRECTORY/web/installations/installationName/servers/mqweb
      • [z/OS]On z/OS: WLP_user_directory/servers/mqweb

        where WLP_user_directory is the directory that was specified when the crtmqweb.sh script ran to create the mqweb server definition.

    2. Configure the mqweb server:
      • To allow remote connections to the mqweb server, add the following line to the mqwebuser.xml file, within the <server> tags:

        <variable name="httpHost" value="hostName"/>

        where hostName specifies the IP address, domain name server (DNS) host name with domain name suffix, or the DNS host name of the server where IBM MQ is installed. Use an asterisk ( * ) to specify all available network interfaces.

      • To allow only local connections to the mqweb server, either remove the following line from the mqwebuser.xml file, or set the value to localhost:

        <variable name="httpHost" value="hostName"/>