Thursday, May 9, 2013

How to change the listening port for the Axway/Vordel API Gateway

[ Update: Axway acquired Vordel in 2012 and the new name for the Vordel Gateway is the Axway API Gateway ]

A common question about the Axway/Vordel API Gateway is "How do you change its listening port?". The key to answering this question is to understand what are the "Services" groups under Policy Studio for the API Gateway:

What are the "Services" groups?

If you look under "Listeners" in Policy Studio, you will see the various "Services" groups. In the screenshot below we see "Default Services", "OAuth 2.0 Services" and "Sample Services". These are a way to group different paths under different ports. So, for example, the sample services are only available under the port which is defined under "Sample Services". And, the sample services can be disabled en masse, without affecting other listeners. You could also setup a new Services group, call it "SSL Only", then put an SSL listener in that group. Then, paths exposed under "SSL Only" could only be accessed using SSL.


Parameterized Ports

If you look at the circled item in the screenshot above, you see that the port number is not visible. Instead, we see an environmentalized parameter. So where is the port number? Notice that the variable starts with "env". This is a clue. It is in the Environmental Properties file.

So, if you look under /conf for the particular API Server instance, you can find the envSettings.props file, which is where this variable is defined. Here we see it below:



Notice the highlighted text. This is where the port is defined, and it's port 8080 at the moment. You can change this value here. And, in fact, you can add other variables here and then reference them in policies, providing environmental customization of the API Gateway [e.g. on another machine, we may use 8888 instead].