Adding a Reverse Proxy Server
A reverse proxy server retrieves information from a server and sends it to a client as though the information originated from the reverse proxy sever rather than the actual server. You can use a reverse proxy server to block access to selected applications in a server. For example, this is useful when you want to expose the token API in such a way that the clients can authenticate against OAuth2 using the same port that their API's are on.
The API Manager comes with two Web applications as the Publisher and Store. You can route the requests that come to them through a proxy server by editing the <AM_HOME>/repository/deployment/server/jaggeryapps/store(/publisher)/site/conf/site.json
file. For example, to use a reverse proxy server for the API Store, edit the <AM_HOME>/repository/deployment/server/jaggeryapps/store/site/conf/site.json
file with the context and request URL as shown below.
"reverseProxy" : { "enabled" : true, "host" : "apistore.com", // If reverse proxy do not have a domain name use IP "context":"/apimanager/store", "regContext":"" // Use only if different path is used for registry }
If you set up the reverse proxy server correctly, when you access the URL https://localhost/public/store
, you will be directed to the API Store.
To do the same for the API Publisher, edit the <AM_HOME>/repository/deployment/server/jaggeryapps/publisher/site/conf/site.json
file.
Also note that if you want to change all the default API Manager ports, you do so by editing the <APIM_HOME>/repository/conf/tomcat/catalina-server.xml
file.