2. Customize the Gateway Port and Path

This section explains how to configure the global Knox Gateway properties. The gateway properties effects the URL used by the external clients to access the internal cluster. By default the port is set to 8443 and the context path is gateway.

To change the context path or port:

  1. Edit the gateway-site.xml and modify the following properties:

    <property>
      <name>gateway.port</name>
      <value>$gateway_port</value>
      <description>The HTTP port for the Gateway.</description>
    </property>
    
    <property>
       <name>gateway.path</name>
       <value>$gateway_path</value>
       <description>The default context path for the gateway.</description>
    </property>

    where:

    • $gateway_port is the HTTP port for the gateway, the default port is 8443.

    • $gateway_path is the context path in the external URL, the preconfigured value is gateway. For example, https://knox.hortonworks.com:8443/hadoop/...,where hadoop is the context path.

  2. Restart the gateway:

    su -l knox -c '$gateway_home/bin/gateway.sh stop'
    su -l knox -c '$gateway_home/bin/gateway.sh start'

    The gateway loads the new configuration on startup.


loading table of contents...