Apache PHP

Apache PHP

The platform adapts the open-source Apache HTTP Server to provide a secure, efficient, and scalable PHP application server. The stack includes built-in PHP support and HTTP/2 support when SSL is enabled.

Apache PHP Overview

The Apache PHP stack provides PHP execution through the Apache PHP module and supports HTTP/2 through the Apache HTTP/2 module. SSL is required for HTTP/2.

  • The template uses the modern systemd initialization daemon.
  • Use apachectl -M to display the loaded Apache modules.
  • The default phpinfo page also shows loaded modules and PHP runtime settings.
PHP information page with loaded modules
The phpinfo page displays loaded modules and server information.

Create an Apache PHP Environment

1

Open the environment wizard

Sign in to the dashboard and click New Environment.

New Environment button
Start creating the PHP environment from the dashboard.
2

Select Apache

Open the PHP tab, choose Apache, and configure Cloudlet limits, Public IP, region, and other required settings.

Apache PHP topology wizard
Select Apache and configure the PHP environment topology.
3

Create the environment

Enter the environment name and click Create.

Open and Verify the Server

After provisioning completes, click Open in Browser beside the Apache application server.

Open Apache PHP in a browser
Open the Apache PHP server from the environment dashboard.

The default page displays the server’s phpinfo data. After confirming the server is available, deploy the PHP application.

Apache PHP information page
The phpinfo page confirms that Apache PHP is running.

Apache PHP Configuration

Configuration FilePurpose
/etc/php.iniContains PHP directives and runtime settings.
/etc/httpd/conf.d/php.confConfigures PHP script execution.
/etc/httpd/conf/httpd.confContains the main Apache HTTP Server directives.

Change the File-Upload Limit

1

Open Configuration Manager

Click Config beside the Apache application server.

Apache PHP Config button
Open the Apache PHP configuration-file manager.
2

Edit php.ini

Open /etc/php.ini from Favorites and update upload_max_filesize and post_max_size. The documented default for both is 100 MB.

Adjust upload settings in php.ini
Update upload_max_filesize and post_max_size in php.ini.
Platform file-manager limit: Regardless of the PHP settings, the documented maximum local upload through the platform file manager is 150 MB and may vary by hosting provider. Use upload by URL or another transfer method such as FTP for larger files.
Upload a file through a URL
Use the URL option for larger files.
3

Save and restart the nodes

Save the updated file and click Restart Nodes for the Apache layer.

Restart Apache PHP nodes
Restart the application-server nodes to apply the new settings.

Expected Result

An Apache PHP environment is created and accessible in the browser. PHP applications can be deployed to it, and Apache or PHP settings can be adjusted through Configuration Manager.

Important Notes

  • SSL is required for HTTP/2.
  • Use apachectl -M or the phpinfo page to review loaded modules.
  • Keep post_max_size equal to or greater than upload_max_filesize.
  • Save configuration changes and restart the nodes when required.
  • The hosting provider may define a different file-manager upload limit.