< Table of Contents

About Gateway Configuration

After you install the Gateway, you can configure it by modifying the settings in the configuration file GATEWAY_HOME/conf/gateway-config.xml file. The actual location of the GATEWAY_HOME directory depends on your operating system and the method (standalone or installer) used to install the Gateway. You can find more information about GATEWAY_HOME and the directory structure that is set up during installation in Setting Up the Gateway. This document describes the types of configuration files and Configuration Element Index provides a list of the individual configuration elements.

By default, the Gateway uses the values in the Gateway configuration file when you start the Gateway. Optionally, you can override one or more Gateway configuration settings by specifying the GATEWAY_OPTS environment variable before you start the Gateway. This method is described in Configure Kaazing Gateway Using the GATEWAY_OPTS Environment Variable.

This topic covers the following information:

About Kaazing Gateway Configuration Files

The Gateway provides the following configuration file:

Notes

About Kaazing Gateway Configuration File Elements and Properties

Kaazing Gateway configuration file (gateway-config.xml or gateway-config.xml) can include a number of configuration elements and properties contained within the top-level gateway-config element.

At a minimum, the Gateway configuration file must contain the following components (which are included in the default configuration files):

For example, the following is an example of a minimally configured Gateway configuration file:

<?xml version="1.0" encoding="UTF-8" ?>

<gateway-config
    xmlns="http://xmlns.kaazing.org/2016/06/gateway">
    ...
    <properties>
        <property>
            <name>gateway.hostname</name>
            <value>localhost</value>
        </property>
        <property>
            <name>gateway.base.port</name>
            <value>8000</value>
        </property>
    </properties>
    ...
    <service>
        <name>Base Directory Service</name>
        <accept>http://${gateway.hostname}:${gateway.base.port}/</accept>

        <type>directory</type>
        <properties>
            <directory>/base</directory>
            <welcome-file>index.md</welcome-file>
            <error-pages-directory>/error-pages</error-pages-directory>
            <options>indexes</options>
        </properties>
    </service>
    ...
</gateway-config>

To customize your configuration, see the Configure Kaazing Gateway topic for a step-by-step procedure to configure the Gateway. Also, you can find a complete list of elements in the Configuration Element Index.

About Kaazing Gateway Namespace Declarations

Your Kaazing Gateway configuration file must contain a namespace declaration. Each release of the Gateway has a unique namespace declaration. The namespace is defined by the xmlns attribute in the gateway-config element and has the syntax: xmlns=**"URI"** as shown in the following examples.

Example: gateway-config.xml file

The namespace for gateway-config.xml is shown in line 1:

<gateway-config xmlns="http://xmlns.kaazing.org/2016/06/gateway">
  ...
</gateway-config>

Example: jaas-config.xml file

The namespace for jaas-config.xml is shown in line 1:

<jaas-config xmlns="http://xmlns.kaazing.com/jaas-config/centurion">
  ...
</jaas-config>

When the Gateway starts, it uses the namespace declaration (which corresponds to a particular XML schema definition) to determine how to parse the XML file. Thus, when you start the Gateway:

Notes:
Configuration files that contain a wrong or an out-of-date namespace declaration can result in one of the following scenarios when the Gateway starts:

See Also