Deploying the Apache agent
To use the Apache agent, copy the files to your Apache directory and modify your Apache configuration.
About this task
The PingFederate Apache agent is represented by the <apache_home>/conf/mod_pf.conf
Apache module (dynamic library) and an auxiliary OpenToken library. The behavior of the Apache agent is controlled by properties contained in the mod_pf.conf
file.
Steps
-
Download the Apache Linux Integration Kit
.zip
archive from the Ping Identity Integration Directory. -
In the Apache Linux Integration Kit
.zip
archive, copy the contents of theapache-agent/lib
directory that corresponds to your Linux version into your Apache/modules
directory. If the files already exist, overwrite them.For an Apache HTTP Server running on Canonical Ubuntu, use the modules found in the corresponding version’s subdirectory:
Apache_2.4/Ubuntu<version>_64
. -
For new installations, in the integration-kit
apache-agent/config
directory, copy themod_pf.conf
,start_page_template.html
,fragment_preservation_request_template.html
, and theerror_page_template.html
files into the/conf
directory of your Apache installation (or the/etc/apache2/conf-available/
directory in Ubuntu). -
Copy the
agent-config.txt
file that you downloaded in Configuring an OpenToken SP Adapter instance to the Apache/conf
folder. -
If you’re using Security Enhanced Linux, run the following commands as the root user:
chcon --reference /usr/sbin/httpd /etc/httpd/modules/mod_pf.so chcon --reference /usr/sbin/httpd /etc/httpd/modules/libopentoken.so
This allows the agent to run in the
httpd
context.The preceding paths assume the default Linux installation.
-
In the Apache
httpd.conf
file, add the following statement above any otherLoadModule
statements:LoadModule access_compat_module modules/mod_access_compat.so LoadFile modules/libopentoken.so LoadModule pf_module modules/mod_pf.so PingFederateConfigurationFile conf/mod_pf.conf
Depending on the Ubuntu version, the module installation with default Apache could require additional steps. If so, perform steps 6a - 6c. Otherwise, skip to step 7.
-
Place the
.so
files in the/usr/lib/apache2/modules/
directory.Result:
A configuration file (
/etc/apache2/mods-available/mod_pf.load
) is created to load the module. It contains the following statements:LoadModule access_compat_module /usr/lib/apache2/modules/mod_access_compat.so LoadFile /usr/lib/apache2/modules/libopentoken.so LoadModule pf_module /usr/lib/apache2/modules/mod_pf.so
-
Link this file as enabled modules in the
/etc/apache2/mods-enabled/
directory:sudo ln -s ../mods-available/mod_pf.load mod_pf.load
-
Link the
/etc/apache2/conf-available/mod_pf.conf
file as enabled conf in the/etc/apache2/conf-enabled
file:sudo ln -s ../conf-available/mod_pf.conf mod_pf.conf
-
-
Add the following statement within all
Directory
contexts that the agent should handle:AuthType PFApacheAgent
Use a "deny by default" configuration for all directories that you want the Apache agent to protect:
Order Deny,Allow Deny from all
Learn more about
AuthType
examples in Apache Integration Kit AuthType examples in the Ping Identity Knowledge Base. -
Restart Apache.