[V9.0.1 Nov 2016]

Configuring the HTTP and HTTPS ports

By default, the mqweb server that hosts the IBM® MQ Console and REST API uses the HTTPS port 9443. The port that is associated with HTTP connections is disabled. You can enable the HTTP port, configure a different HTTPS port, or disable the HTTP or HTTPS port. [V9.0.4 Oct 2017]From IBM MQ 9.0.4, you can configure the ports by using the setmqweb command. In IBM MQ 9.0.3, and earlier, you can configure the ports by editing the mqwebuser.xml file.

Before you begin

You must be a privileged user to complete this procedure.
If you enable both the HTTP and HTTPS ports, an LTPA token that is issued for an HTTPS request can be reused for an HTTP request from a browser. You can configure the mqweb server to prevent this behavior, and make the environment more secure, by adding the following line to the mqwebuser.xml file:
<webAppSecurity ssoRequiresSSL="true"/>
[V9.0.4 Oct 2017]From IBM MQ 9.0.4,you can view the current configuration of the HTTP and HTTPS ports by using the following command:
dspmqweb properties -a
The httpPort field shows the HTTP port, and the httpsPort field shows the HTTPS port. 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 ports:
  • From IBM MQ 9.0.4, use the setmqweb properties command:
    • To enable or configure the HTTP port, use the following command:

      setmqweb properties -k httpPort -v portNumber

      where portNumber specifies the port that you want to use for HTTP connections. You can disable the port by using a value of -1.

    • To configure the HTTPS port, use the following command:

      setmqweb properties -k httpsPort -v portNumber

      where portNumber specifies the port that you want to use for HTTPS connections. You can disable the port by using a value of -1.

  • 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 ports:
      • To enable or configure the HTTP port, add or edit the following line in the mqwebuser.xml file, within the <server> tags:

        <variable name="httpPort" value="portNumber" />

        where portNumber specifies the port that you want to use for HTTP connections. You can disable the port by using a value of -1.

      • To configure the HTTPS port, add or edit the following line in the mqwebuser.xml file, within the <server> tags:

        <variable name="httpsPort" value="portNumber" />

        where portNumber specifies the port that you want to use for HTTPS connections. You can disable the port by using a value of -1.