Manish Kumar
Manish Kumar

Reputation: 395

How to disable the HTTP port totally inside WSO API Manager?

What configuration will help to disable HTTP port totally from WSO- APIM (Only https port will be in running/listening state) I tried by removing http from carbon configuration, but it just removing from WSO-Store-UI perspective.

Unchecking the HTTP while PUBLISHING the API, solved problem. But, from back-end perspective, the port is still in listening mode. It will be better to have a configuration process, that will completely disable HTTP port.

Upvotes: 0

Views: 941

Answers (1)

Amila Maharachchi
Amila Maharachchi

Reputation: 2149

WSO2 API Manager has two transports. Those are

  1. Servlet transport to serve the UI - This listenes in 9763(http) and 9443(https).
  2. Pass through transport to serve the api requests - This listens in 8280(http) and 8243(https).

By going through your question, what I understood was, you want to disable the pass through transport listening in the https port. If so, you can do it as follows.

  1. Find the axis2.xml file in repository/conf/axis2 folder.
  2. Go to the "Transport Listeners" section.
  3. There you will find a transport receiver with name "http" which listens in port 8280.

    <transportReceiver name="http" class="org.apache.synapse.transport.passthru.PassThroughHttpListener">
    <parameter name="port" locked="false">8280</parameter>
    <parameter name="non-blocking" locked="false">true</parameter>
    <!--parameter name="bind-address" locked="false">hostname or IP address</parameter-->
    <!--parameter name="WSDLEPRPrefix" locked="false">https://apachehost:port/somepath</parameter-->
    <parameter name="httpGetProcessor" locked="false">org.wso2.carbon.transport.nhttp.api.PassThroughNHttpGetProcessor</parameter>
    <!--<parameter name="priorityConfigFile" locked="false">location of priority configuration file</parameter>-->
    

  4. Comment it out properly and restart the server.

Upvotes: 1

Related Questions