PHP App Server Configuration

PHP Application Server Configuration

PHP application servers can be configured through the platform Configuration Manager. In a multi-node layer, file-content changes can be saved either to one selected instance or to all application-server instances.

Configure One or All Instances

1

Open Configuration Manager

Click Config beside the PHP application-server layer.

2

Select the required server

Open the drop-down menu at the top of the configuration tab and choose the application-server instance that should be edited.

Select a PHP application-server instance
Choose the required PHP server from the configuration-tab drop-down.
3

Save the changes

Use Save only for the current instance to update one selected server, or Save for all instances to apply the edited file content across the layer.

Save configuration for one or all PHP instances
Save the file for the current instance or for all application-server instances.
File and folder limitation: Creating or renaming a file or folder affects only the selected node. Repeat that structural change manually on the other application-server instances.

Available Configuration Files

Apache PHP

FolderFilePath
etcphp.ini/etc
conf.dmodules.conf, aliases.conf, geoip.conf, mod_security.conf, php.conf, ssl.conf, welcome.conf/etc/httpd/conf.d/
confhttpd.conf/etc/httpd/conf/
webrootApplication files/var/www/webroot
cronapache/var/spool/cron
keysPrivate keys/var/lib/jelastic/keys
modulesPHP modules/usr/lib64/php/modules

NGINX PHP

FolderFilePath
etcphp-fpm.conf, php.ini/etc
conf.dvirtual.conf, ssl.conf/etc/nginx/conf.d
confnginx.conf/etc/nginx
webrootApplication files/var/www/webroot
cronnginx/var/spool/cron
keysPrivate keys/var/lib/jelastic/keys
modulesPHP modules/usr/lib64/php/modules

ETC Folder

The main PHP runtime configuration is stored in php.ini. It can be used to manage PHP extensions, accelerators, Memcached session storage, and PHP security settings.

PHP ini configuration file
Use php.ini for the main PHP runtime settings.

CONF Folder

Apache

The main Apache configuration file is httpd.conf. It can be used to configure multiple domains, custom modules, WebDAV, security, name-based virtual hosts, and server statistics.

Apache httpd configuration file
Use httpd.conf for the main Apache server configuration.
Apache autoconfiguration: To make custom changes in httpd.conf, remove the #Jelastic autoconfiguration marker at the beginning of the file. Doing this disables the platform’s automatic worker adjustment for that file.
Apache autoconfiguration marker
The marker controls platform-managed Apache autoconfiguration.

Apache automatically adjusts the number of PHP request workers according to the configured Cloudlet limit. The MaxClients value increases or decreases after the environment topology is changed.

Apache MaxClients before scaling
Record the MaxClients value before changing the Cloudlet limit.
Apache MaxClients after scaling
The MaxClients value changes automatically after the Cloudlet limit is adjusted.

NGINX

The main NGINX PHP configuration file is nginx.conf. It can be used to configure multiple domains, WebDAV, and NGINX security settings.

NGINX configuration file
Use nginx.conf for the main NGINX PHP server configuration.

CONF.D Folder

The conf.d folder stores and manages server subconfiguration files.

PHP server conf.d folder
Store server subconfiguration files in conf.d.

WEBROOT Folder

The webroot folder stores the unpacked application deployed to the environment.

PHP webroot folder
The deployed application files are stored under webroot.

CRON Folder

The application-server cron folder contains the configuration file used to define cron jobs.

PHP cron folder
Configure scheduled tasks in the application-server cron file.

KEYS Folder

Upload private keys required by the application to the keys directory and reference them through:

/var/lib/jelastic/keys/{key_file_name}
PHP keys folder
Store application private keys in the platform keys directory.

MODULES Folder

The modules folder contains PHP modules available by default. Custom PHP modules can also be uploaded to this directory for activation.

PHP modules folder
Review default PHP modules or upload custom module files.

Important Notes

  • Back up configuration files before editing them.
  • File-content changes can be saved to one or all nodes, but creating or renaming files and folders must be repeated manually.
  • Removing the Apache autoconfiguration marker disables automatic MaxClients adjustment.
  • Restart or reload the PHP application server when required by the modified setting.
  • Protect private-key files with appropriate access controls.