Introduction
This document describes how to install the AppDynamics Apache Web Server Agent on a Red Hat Enterprise Linux system with a sample app.
Prerequisites
Requirements
-
A running Apache HTTP Server (httpd) or containerized Apache service on RHEL
-
Root or sudo access for installation and configuration
-
An AppDynamics Controller (SaaS or On-Prem)
-
Access credentials (Account Name, Access Key, Controller Host)
Components Used
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.
Background Information
The AppDynamics Apache Agent enables visibility into incoming HTTP requests and propagates transaction correlation headers to backend tiers like Java or Node.js agents. This setup is especially useful for observing full transaction traceability in distributed architectures.
Configure
Step 1: Install the Agent
- Visit AppDynamics Downloads.
- Choose Web Server Agent for Linux 64-bit.
- Download the .tgz archive to your target server or Docker build context.
Step 2: Embed Configuration in Apache
Tip: Make sure to change the details for the code snippet with correct values.
# Loading AppD agent SDK
LoadFile /opt/appdynamics-sdk-native/sdk_lib/lib/libzmq.so.5
LoadFile /opt/appdynamics-sdk-native/sdk_lib/lib/libappdynamics_native_sdk.so
# Loading the AppD agent shared library for Apache 2.4
LoadModule appdynamics_module /opt/appdynamics-sdk-native/WebServerAgent/Apache/libmod_appdynamics.so
# Set agent settings here
# Hostname or IP of the AppD controller (using provided controller)
AppDynamicsControllerHost "XXXX"
# AppD account name
AppDynamicsAccountName "XXXX"
# AppD access key
AppDynamicsAccessKey "XXXX"
# Application name
AppDynamicsApplication "XXXX"
# Tier name
AppDynamicsTier "XXXX"
# Node name
AppDynamicsNode "XXXX"
# Enabling web server monitoring
AppDynamicsEnabled ON
# Port to connect with the controller
AppDynamicsControllerPort 443
# Setting SSL on
AppDynamicsControllerSSL ON
# Enabling auto-launch of the appD proxy
AppDynamicsLaunchProxy ON
Then update Apache’s main config to include this file:
echo "Include conf.d/appdynamics_agent.conf" >> /etc/httpd/conf/httpd.conf
Tip: Sample Dockerfile. Refer the Github link for the complete sample app from Related Information. If you using any other version of Apache AppDynamics agent then Dockerfile needs to be modified accordingly.
#Sample Dockerfile
# Start from the Red Hat Universal Base Image with Apache httpd 2.4
FROM --platform=linux/amd64 registry.access.redhat.com/ubi8/httpd-24
# installed required software
USER root
RUN dnf -y update
RUN dnf -y install tar wget nano net-tools procps
# (Optional) Copy your custom web content into the default document root.
COPY index.html /var/www/html/index.html
# Disable the SSL configuration for testing currently. Import the certificate if using SSL
#(rename it so it won't be loaded)
RUN mv /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.conf.disabled
# Add ServerName directive to suppress the warning
RUN echo "ServerName localhost" >> /etc/httpd/conf/httpd.conf
# AppDynamics configuration
# Copying the custom config file for AppD agent
COPY ./appdynamics_agent.conf /etc/httpd/conf/appdynamics_agent.conf
# Expose HTTP port 8080
EXPOSE 8080
WORKDIR /appd
#Copy the agent files
COPY ./appdynamics-sdk-native-nativeWebServer-64bit-linux-24.11.0.2449.tgz ./
# Extracting the file downloaded
RUN tar -xzvf appdynamics*.tgz -C /opt
# Specifying the path for the required libraries
#ENV LD_LIBRARY_PATH="/opt/appdynamics-sdk-native/sdk_lib/lib/"
ENV LD_LIBRARY_PATH="/opt/appdynamics-sdk-native/sdk_lib/lib/:$LD_LIBRARY_PATH"
# Including the appdynamics config file into the original httpd configuration
RUN echo "Include /etc/httpd/conf/appdynamics_agent.conf" >> /etc/httpd/conf/httpd.conf
# Running apache agent installation script
RUN /opt/appdynamics-sdk-native/install.sh
# Running the httpd server in foreground
CMD ["/usr/sbin/httpd", "-DFOREGROUND"]
Step 3: Restart the HTTPD
If running on server restart the httpd process, in case of Docker it is taken care by starting the container as it start apache with the agent.
sudo systemctl restart httpd
Verify
Step 1: Start Your App
Access your Apache server in a browser:
http://<your-server-ip>:80/
Or via Docker
http://localhost:8080/
Step 2: Go to AppDynamics Dashboard
-
Log in to your AppDynamics Controller.
-
Navigate toApplications > Hello_World_Apache.
-
Look for metrics and flow maps within 5 minutes.

Troubleshoot
Issue
|
Possible Cause
|
Resolution
|
Apache fails to restart
|
Incorrect path to mod_appdynamics.so
|
Validate file path and permissions
|
No metrics in AppDynamics
|
Controller config incorrect
|
Double-check Access Key, Host, Account name
|
Apache logs don’t show agent activity
|
Module not loading
|
Check httpd error logs; verify LoadModule line
|
Logs not generated
|
Missing logs/ dir or permissions
|
Check <agent_install_directory>/logs
|
Related Information
Need Further Assistance?
If you have a question or experiencing issues, please create asupport ticketwith these details:
- Error details or screenshot:Provide specific error message or a screenshot of the problem.
- Command used: Specify the exact command you were running when the issue occurred.
- Apache agent logs: Provide the agent logs from <agent_install_directory>/logs if generated.