Changing the WSO2 Identity Server Host Name to access with a IP Address or Host Name inplace of localhost
You can change the wso2 identity server host name by following the below steps.
Assume your IS is running on a remote ubuntu instance in openstack cloud. Then you need to access the IS server with a URL by being inside your local machine. In a scenario like this you need to change the host name to ip value or another value to make it available to access with a URL.
Follow the steps below to achieve this
Assume your IS is running in the remote instance 192.168.108.66
Go inside below location and execute the mentioned commands
<IS-HOME>/repository/resources/security
mv wso2carbon.jks /home/ubuntu/
/home/ubuntu/java/jdk1.8.0_121/bin/keytool -genkey -alias wso2carbon -keyalg RSA -keysize 2048 -keystore wso2carbon.jks -ext SAN=”dns:is590testenv2,ip:192.168.108.66" -dname “CN=is590testenv2, OU=Home,O=Home,L=SL,S=WS,C=LK” -storepass wso2carbon -keypass wso2carbon
[Here dns: name and CN: name needs to be the hostname that you need to give. and the ip is the ip address of the remote instance where the server is running.]
keytool -export -alias wso2carbon -keystore wso2carbon.jks -file test.pem
keytool -import -alias carbon1 -file test.pem -keystore client-truststore.jks -storepass wso2carbon
Now go to below file location
<IS-HOME>/repository/conf/cabon.xml
Change the below 2 entries for the CN name given in above commands
HostName is590testenv2 HostName
MgtHostName is590testenv2 MgtHostName
Now in your local machine from where you are willing to access the server add the below entry in etc/hosts file
192.168.108.66 is590testenv2
Now inplace of locahost you can access the IS server from any machine with below URL