cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Brennan.Hildebrand
AppDynamics Team

Question

How do I provide a username and password for an HTTP proxy for use with the Apache Web Server Agent or C/C++ SDK?

 

Scope

This article applies only to those versions of the Apache Web Server Agent and C/C++ SDK that utilize the standalone Java Proxy for connecting with the AppDynamics Controller.

 

Answer

In order to configure the HTTP Proxy with a username and password file, you need to manually edit the <agent-install-dir>proxy/runProxy script.

 

Step 1

Near line 20, you should see the following:

 

httpProxyHost=
httpProxyPort=
httpProxyUser=
httpProxyPasswordFile=

 

Assign the appropriate values for your HTTP Proxy to these variables.

 

Step 2

Near line 219, you should see the following:

 

if [ -n "${httpProxyHost}" ] ; then
    cmdLine[${#cmdLine[@]}]="-Dappdynamics.http.proxyHost=${httpProxyHost}"
    cmdLine[${#cmdLine[@]}]="-Dappdynamics.http.proxyPort=${httpProxyPort}"
fi

 

Edit this code to add the username and password file to the java cmdLine as such:

 

if [ -n "${httpProxyHost}" ] ; then
    cmdLine[${#cmdLine[@]}]="-Dappdynamics.http.proxyHost=${httpProxyHost}"
    cmdLine[${#cmdLine[@]}]="-Dappdynamics.http.proxyPort=${httpProxyPort}"
    if [ -n "${httpProxyUser}" ]; then
        cmdLine[${#cmdLine[@]}]="-Dappdynamics.http.proxyUser=${httpProxyUser}"
    fi
    if [ -n "${httpProxyPasswordFile}" ]; then
        cmdLine[${#cmdLine[@]}]="-Dappdynamics.http.proxyPasswordFile=${httpProxyPasswordFile}"
    fi
fi

 

From now on, when you run <agent-install-dir>/runSDKProxy.sh, which in turn calls the proxy/runProxy script, it will instruct the java proxy to use the http proxy as defined by the variables near line 20.

Version history
Last update:
‎02-04-2019 02:03 PM
Updated by:
Join Us On December 10
Learn how Splunk and AppDynamics are redefining observability


Register Now!

Observe and Explore
Dive into our Community Blog for the Latest Insights and Updates!


Read the blog here