I have hosted WSO2 API Manager into my virtual machine with static ip address.
I can open my Carbon, Publisher and Store page by entering these addresses:
https://my.ip.address:9443/publisher
https://my.ip.address:9443/store
https://my.ip.address:9443/carbon
When I add my API in my publisher page, it creates endpoint in 172.x.x.x.x
address which is only for internal use.
So in order to have access to my endpoints outside I have written these lines in my \wso2\wso2am-2.1.0\repository\conf\api-manager.xml
into APIGateway
:
<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>
<!-- Server URL of the API gateway -->
<ServerURL>https://localhost:${mgt.transport.https.port}${carbon.context}services/</ServerURL>
<!-- Admin username for the API gateway. -->
<Username>${admin.username}</Username>
<!-- Admin password for the API gateway.-->
<Password>${admin.password}</Password>
<!-- Endpoint URLs for the APIs hosted in this API gateway.-->
<GatewayEndpoint>http://${carbon.local.ip}:${http.nio.port},https://${carbon.local.ip}:${https.nio.port},http//my.ip.address:${http.nio.port},https://my.ip.address:${https.nio.port}</GatewayEndpoint>
</Environment>
</Environments>
</APIGateway>
Now when I publish my APIs Production and Sandbox URLs are:
http://my.ip.address:8280/path/to/my/api
https://my.ip.address:8243/path/to/my/api
However, when I try to make requests to my API urls, I get timeout errors.
Why this is happening?