问题
I have installed wso2am. After starting the services it gives me 3 urls.
1) for store 2) for publisher 3) for carbon
Now i need to set a domain name rather than IP address in the URLs.
I am trying to do it on local machine (Just added the wso2am root folder and running wso2server.bat file).
<APIGateway>
<Environments>
<Environment type="hybrid" api-console="true">
<Name>Production and Sandbox</Name>
<Description>This is a hybrid gateway that handles both production and sandbox token traffic.</Description>
<ServerURL>https://demodomain.com:${mgt.transport.https.port}${carbon.context}services/</ServerURL>
<Username>${admin.username}</Username>
<Password>${admin.password}</Password>
<GatewayEndpoint>http://demodomain.com:${http.nio.port},https://demodomain.com:${https.nio.port}</GatewayEndpoint>
</Environment>
</Environments>
</APIGateway>
Here demodomain.com
is the domain name i am using rather than localhost or whatever IP wso2 is assigning.
After this i restart the server and again wso2 provides me URLs with IPs. Its not using demodomain.com
. If i try to access store/publisher/carbon using that domain name it doesn't load.
Any ideas?
EDIT
I have gone through https://docs.wso2.com/display/AM200/Customize+the+API+Store+and+Gateway+URLs this. But seems its outdated. I cant find /_system/governance/customurl/api-cloud/<tenant-id>/urlMapping/<tenant-id>
under carbon->Browse->Resources
section.
EDIT
Even after setting this
<HostName>demodomain.com</HostName>
in carbon.xml
after restarting i am still seeing the below. Its still generating dynamic IPs.
回答1:
Edit the
<HostName>demodomain.com</HostName>
xml tag in carbon.xml
to demodomain.com
.
The <GatewayEndpoint>
tags refer to which endpoints your deployed APIs will be available on.
回答2:
Set
<HostName>demodomain.com</HostName>
<MgtHostName>demodomain.com</MgtHostName>
in carbon.xml
.
来源:https://stackoverflow.com/questions/45958320/wso2am-change-store-publisher-carbon-url