Enable Reverse Proxy for Java Agent
By default, the reverse proxy is disabled. You can use one of the following properties or environment variables to enable it.
Node Property | System Property | Environment Variable |
---|---|---|
enable-reverse-proxy |
appdynamics.reverse.proxy.enabled
= true/false |
APPDYNAMICS_REVERSE_PROXY_ENABLED
= true/false |
The environment variable takes precedence over the system property. To disable the
reverse proxy configuration, all three must be false
or not set.
When the agent makes an API call to the Controller, the agent checks the node property status, if set to:
true
- The required host header is added to the request.false
- The agent checks the value of the environment variable. If the environment variable is set totrue
, the required host header is added to the request. If the environment variable is set tofalse
, the agent checks the system value property. If the system value property is set totrue
, the required host header is added to the request. If set tofalse
, the reverse proxy is not enabled and the host header is not added to the request.
You can utilize Java agent reverse proxy to:
- Configure two or more Controllers
- Mask the Controller hostname for additional security
- Load balance multiple Controllers.
When the reverse proxy is enabled, the API calls from agent to Controller fail
because API calls need the host header to know the domain to which calls are made.
Enabling reverse proxy masks the Controller hostname which results in the 503
Service Unavailable
error. To fix this issue, the agent adds the host
header to the request derived from the accountName
of Controllers that has
the reverse proxy enabled.