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
.ziparchive from the Add-ons tab of the PingFederate downloads page or the Ping Identity Marketplace. -
In the Apache Linux Integration Kit
.ziparchive, copy the contents of theapache-agent/libdirectory that corresponds to your Linux version into your Apache/modulesdirectory. 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/configdirectory, copy themod_pf.conf,start_page_template.html,fragment_preservation_request_template.html, and theerror_page_template.htmlfiles into the/confdirectory of your Apache installation (or the/etc/apache2/conf-available/directory in Ubuntu). -
Copy the
agent-config.txtfile that you downloaded in Configuring an OpenToken SP Adapter instance to the Apache/conffolder. -
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.soThis allows the agent to run in the
httpdcontext.The preceding paths assume the default Linux installation.
-
In the Apache
httpd.conffile, add the following statement above any otherLoadModulestatements:LoadModule access_compat_module modules/mod_access_compat.so LoadFile modules/libopentoken.so LoadModule pf_module modules/mod_pf.so PingFederateConfigurationFile conf/mod_pf.confDepending 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
.sofiles 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.conffile as enabled conf in the/etc/apache2/conf-enabledfile:sudo ln -s ../conf-available/mod_pf.conf mod_pf.conf
-
-
Add the following statement within all
Directorycontexts that the agent should handle:AuthType PFApacheAgentUse a "deny by default" configuration for all directories that you want the Apache agent to protect:
Order Deny,Allow Deny from allLearn more about
AuthTypeexamples in Apache Integration Kit AuthType examples in the Ping Identity Knowledge Base. -
Restart Apache.