Can't access to production endpoint with WSO2 API Manager - entreprise proxy

可紊 提交于 2019-12-13 08:24:21

问题


I'm trying wso2 api manager for my team.

When i follow the quick start guide, I can't get a good production endpoint in the implement part. It's the same for wsdl

I think it's because I have the api manager on my computer, and this computer is behind a entreprise proxy. I search on the documentation and on stack overflow but I don't understand how I can say carbon to use the proxy.

If you have an idea of how I can configure AM to use an entreprise proxy, I will be very happy

I don't know if its can help : I can't acces to the api manager whitout using localhost or 127.0.0.1:9443

Thanks !


回答1:


You need to make the following configuration changes to tell API Manager (APIM) to talk to the Web proxy. Restart APIM for the config changes to take effect.

Edit the following file:

  <APIM Home>/repository/conf/axis2/axis2.xml

Add the follow lines in two places:

<parameter name="http.proxyHost" locked="false">proxyName.company.com</parameter>
<parameter name="http.proxyPort" locked="false">1234</parameter>
<parameter name="http.nonProxyHosts" locked="false">localhost</parameter>

Near line 483, add the 3 new lines, such that is looks like this when you’re done:

<transportSender name="http" class="org.apache.synapse.transport.passthru.PassThroughHttpSender">
    <parameter name="non-blocking" locked="false">true</parameter>
    <parameter name="http.proxyHost" locked="false">proxyName.company.com</parameter>
    <parameter name="http.proxyPort" locked="false">1234</parameter>
    <parameter name="http.nonProxyHosts" locked="false">localhost</parameter>
</transportSender>

Near line 528, add the 3 new lines, such that is looks like this when you’re done:

<transportSender name="https" class="org.apache.synapse.transport.passthru.PassThroughHttpSSLSender">
    <parameter name="non-blocking" locked="false">true</parameter>
    <parameter name="http.proxyHost" locked="false">proxyName.company.com</parameter>
    <parameter name="http.proxyPort" locked="false">1234</parameter>
    <parameter name="http.nonProxyHosts" locked="false">localhost</parameter>
    <parameter name="keystore" locked="false">
            <KeyStore>
                <Location>repository/resources/security/wso2carbon.jks</Location>
                <Type>JKS</Type>
                <Password>wso2carbon</Password>
                <KeyPassword>wso2carbon</KeyPassword>
            </KeyStore>
        </parameter>
        <parameter name="truststore" locked="false">
            <TrustStore>
                <Location>repository/resources/security/client-truststore.jks</Location>
                <Type>JKS</Type>
                <Password>wso2carbon</Password>
            </TrustStore>
        </parameter>
        <!--<parameter name="HostnameVerifier">DefaultAndLocalhost</parameter>-->
            <!--supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified -->
    </transportSender>

Restart APIM for the config changes to take effect.




回答2:


  • You need to edit carbon.xml Host parameter if you want to access management console with a host name. (And particular host entry should be resolved with a DNS name, else you can edit hosts file too)

  • If you want to pass the traffic via a proxy server then you need to do like this; In axis2 configuration , at the transport sender configuration two properties has to be provided. http.proxyHost : Proxy server's IP http.proxyPort : Prosy server's port



来源:https://stackoverflow.com/questions/27270323/cant-access-to-production-endpoint-with-wso2-api-manager-entreprise-proxy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!