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. You can configure the ports by using the setmqweb command.

Before you begin

If you enable the HTTP port, and are using token based authentication, you must enable the same LTPA token to be used for both HTTP and HTTPS connections. For more information, see Configuring the LTPA token.

To complete this task, you must be a user with certain privileges so that you can use the dspmqweb and setmqweb commands:
  • [z/OS]On z/OS®, you must have authority to run the dspmqweb and setmqweb commands, and write access to the mqwebuser.xml file.
  • [UNIX, Linux, Windows, IBM i]On all other operating systems, you must be a privileged user.
  • [Linux][MQ 9.3.5 Feb 2024]If the mqweb server is part of a stand-alone IBM MQ Web Server installation, you must have write access to the mqwebuser.xml file in the IBM MQ Web Server data directory.
[z/OS]Attention:

Before you issue 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 set the WLP_USER_DIR environment variable, 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.

[Linux][MQ 9.3.5 Feb 2024]Attention:

Before you issue either the setmqweb or dspmqweb commands in a stand-alone IBM MQ Web Server installation, you must set the MQ_OVERRIDE_DATA_PATH environment variable to the IBM MQ Web Server data directory.

Attention: By default, the mqweb server requires LTPA tokens to be secured for all requests. If the mqweb server is configured to require LTPA tokens to be secured, you cannot complete the following actions when you connect to the HTTP port:
  • Log in to the IBM MQ Console.
  • Use token based authentication with the REST API.
To allow LTPA tokens to be used by HTTP requests, set the value of the secureLTPA property to false. For more information, see Configuring the LTPA token.

Procedure

  • 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.
  • Enable or configure the HTTP port: by using the following command:
    • Enable or set the HTTP port by using 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.

    • Reset the HTTP port value to the default value of -1 by using the following command:

      setmqweb properties -k httpPort -d

  • Configure the HTTPS port:
    • Set the HTTPS port number by using 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.

    • Reset the HTTPS port number to the default value of 9443 by using the following command:

      setmqweb properties -k httpsPort -d