RichardC
RichardC

Reputation: 13

WSO2 API Manager - Displaying correct IP in UI

Have installed the API manager 1.4.0 on a single machine and got everything running. However have found the IP address shown within the management console and store sites are incorrect. For instance in the mgnt console home page the 'Host' and 'Server URL', also on an api's page in the store (both the URLs provides in the overview and the ip used in the 'try it' feature).

Looking into this it seems my network adapter is supplying a privately accessible ip, instead of public (this cannot be changed). This value is then propagated around the API manager on startup between components but also to provide links to access the services externally.

Have looked into the configuration and changed some values, however cannot get all IP's in the UI to display correct. Settings I've changed include..

repository\conf\carbon.xml HostName, MgtHostName, ServerURL

repository\conf\api-manager.xml APIGateway-->APIEndpointURL (also updated APIKeyManager-->ThriftServerHost)

Is there any way to solve this? In particular, is there a way to set an IP that will be published for external access without changing any configuration used for communications within the host?

Upvotes: 1

Views: 3286

Answers (1)

user8658912
user8658912

Reputation: 1592

Instead of an IP address, I would use a domain name, and add it first to your hosts file like:

192.168.1.2 apimanager.example.net

Then edit some carbon.xml parameters to look like:

<HostName>apimanager.example.net</HostName>

<MgtHostName>apimanager.example.net</MgtHostName>

<ServerURL>https://apimanager.example.net:${carbon.management.port}${carbon.context}/services/</ServerURL>

Upvotes: 3

Related Questions