Update the API Portal hostname for secure connections

This section describes how to update the API Portal hostname on a virtual appliance installation.

A default certificate is installed during the installation. API Portal uses a default Apache mod_nss certificate that supports TLS 1.2 for secure connections. Apache matches the CN with the hostname that the Server Name Indication (SNI) requests. This means that the host in the API Portal URL typed in the browser must match the hostname in the certificate. Otherwise, accessing API Portal using the URL https://<API Portal host> fails. Accessing the portal using the IP address succeeds, because in this case SNI is not used.

On a virtual appliance installation, you must update the hostname to match the CN after you have installed API Portal. On a software installation, it is recommened that you generate a new certificate if you change the hostname of your API Portal, but this is optional.

Update the hostname on a virtual appliance installation

Apache matches the fully qualified domain name (FQDN) of the appliance with the API Portal hostname. By default, the hostname of the appliance is localhost.localdomain and does not match the CN in the mod_nss certificate so you must ensure they match before you can access API Portal using the URL.

There are two alternatives:

Change the FQDN on the appliance

If you want to use the API Portal hostname as the FQDN of your appliance, perform the following steps in terminal console as a root user:

  1. Log in to the appliance using an SSH connection.
  2. Navigate to Network settings > Hostname and name server.
  3. Change the Hostname and Domain name to the ones you want to use for API Portal, and select Finish.

Modify the Apache configuration file

If you want to use a different name for API Portal and for the appliance, edit the Apache configuration file:

  1. Ensure that Apache is not running.
  2. Open the following file for editing:
  3. /etc/apache2/vhosts.d/apiportal.conf

  4. In the <VirtualHost *:443> section, un-comment ServerName, and set the value to the hostname you want to use your API Portal (for example, apiportal.mycompany.com:443).
  5. Restart Apache.

Related Links