Changing the Host Name and Context Path of SP Web Applications
WSO2 SP has different profiles for different purposes. When you start these profiles in the terminal, the URLs of different web applications appear in the start up logs. These URLs contain the IP address in which the web application is run, as well as the default name of the web UI application.
e.g., If you start Stream Processor Studio, the following appears in the start up logs:
INFO {org.wso2.carbon.siddhi.editor.core.internal.ServiceComponent} - Editor Started on : http://<IP_ADDRESS>:9390/editor
You can change this URL to display a host name instead of the IP address and/or to display a different name for the web UI application. To do this, follow the topics below:
Changing the IP address to a host name
To change the IP address displayed in the URL to a host name:
- Open the
<SP_HOME>/CONF/<PROFILE>/deployment.yaml
file. In this example, let's make this change in the<SP_HOME>/CONF/editor/deployment.yaml
file. In the
wso2.transport.http:
→listenerConfigurations:
section, change the value for thehost
parameter to the required hostname (e.g.,stream-processor
).Note that in this example, you are specifying a host name for the
http
URLs. If the web UI application you are accessing has anhttps
URL, you need to make this change for the listener configuration with thehttps
scheme.wso2.transport.http:
listenerConfigurations:
-
id: "default"
host: "stream-processor"
port: 9091
Once you start the Editor profile after making this change, http
URLs displayed in the start up log for the Stream Processor Studio display streaming-integrator
as the host name instead of the IP address. e.g., the URL for the Stream Processor Studio is displayed as follows.
INFO {org.wso2.carbon.siddhi.editor.core.internal.ServiceComponent} - Editor Started on : http://StreamProcessor:9390/editor
Changing the name of web UI application
To change the name of the web UI application that appears in its URL, add a section as follows in the <SP_HOME>/CONF/<PROFILE>/deployment.yaml
file. In this example, let's make this change in the <SP_HOME>/CONF/editor/deployment.yaml
file.
wso2.carbon-ui-server:
apps:
# configurations for the Editor app
"editor":
contextPath: "/tooling"
Here, the context path for the editor
webUI application is specified as tooling
. Therefore, when you start the Editor profile, the URL for the Stream Processor Studio appears as follows.
INFO {org.wso2.carbon.siddhi.editor.core.internal.ServiceComponent} - Editor Started on : http://<IP_ADDRESS>:9390/tooling