Add Apache Modules
Adding Custom Apache Modules
When an application requires an Apache module that is not included in the platform by default, you can compile the module for the matching Apache version, upload the generated shared-object file, load it through httpd.conf, and restart the Apache node.
Create the Environment
Open the environment wizard
Sign in to the platform and click Create environment.
Select Apache PHP
Open the PHP tab, choose the Apache application server, define the required resources, enter the environment name, and click Create.


Build the Apache Module
- Download Apache HTTP Server development tools with the same version as the Apache server.
- Download the required module source. The documented example uses
mod_pony. - Compile and install the module with
apxs.
apxs -i -a -c mod_pony.c
The compilation produces an Apache shared-object file. In the documented example, the result is:
/usr/lib64/httpd/modules/mod_pony.so
Upload and Configure the Module
Open Configuration Manager
Locate the environment and click Config beside the Apache server.

Upload the module file
Upload the generated .so file to /usr/lib64/php/modules.

Load the module
Open /etc/httpd/conf/httpd.conf and add a LoadModule directive.
LoadModule {module-name}_module /usr/lib64/php/modules/{file-name}.so
LoadModule pony_module /usr/lib64/php/modules/mod_pony.so

Add module-specific settings
Configure the module according to its documentation. For the mod_pony example, create .htaccess under webroot/ROOT and add:
<Files pony> SetHandler pony </Files>

Restart Apache
Restart the Apache node after all module and application configuration changes are saved.
Check the Result
Click Open in browser for the environment, append /pony to the URL, and refresh the page.



Important Notes
- Compile the module for the exact Apache version and architecture used by the target environment.
- Use only trusted module source code.
- Back up
httpd.confbefore adding a custom module. - An invalid or incompatible module can prevent Apache from starting.
- Repeat the upload and configuration for all required nodes in a multi-node Apache layer.
