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:
Edit the
and modify the following properties:$gateway_home
/conf/gateway-site.xml<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 isgateway
. For example, https://knox.hortonworks.com:8443/hadoop/...,where hadoop is the context path.
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.