Configure 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. We can configure host name to allow remote connections by using the setmqweb command.


Before starting

To complete this task, we must be a user with certain privileges so that we can use the dspmqweb and setmqweb commands:

  • On z/OS, we must have authority to run the dspmqweb and setmqweb commands, and write access to the mqwebuser.xml file.
  • On all other operating systems, we must be a privileged user.

Attention:

Before issuing either the setmqweb or dspmqweb commands on z/OS, we 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. For example:
export WLP_USER_DIR=/var/mqm/web/installation1

For more information, see Create the mqweb server.


Procedure

  • 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.
  • Set the HTTP host name by using the following 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.

  • Unset the HTTP host name by using the following command:

    setmqweb properties -k httpHost -d

Parent topic: Configure the IBM MQ Console and REST API