NGINX PHP is the NGINX web server packaged as a PHP application server on the Stack Harbor PaaS. The stack uses PHP-FPM over FastCGI, so NGINX handles connections and static assets while PHP-FPM processes scripts.
Compared to Apache PHP, NGINX PHP is better at serving static content and handles a high count of concurrent connections more efficiently. FastCGI keeps it suitable for full dynamic workloads as well.
The stack is HTTP/3-ready from NGINX 1.16.1 onward for PHP 7.2.26, 7.3.13, 7.4.1 and later. To use HTTP/3 end-to-end you need a public IP — the platform’s shared load balancer does not terminate HTTP/3.
The container uses a systemd init.
Provisioning an NGINX PHP environment
- Click New Environment in the dashboard.
- In the topology wizard, open the PHP tab and pick NGINX as the application server. Set cloudlets, region, and any other parameters.
- Click Create.
- Once the environment is up, click Open in Browser next to the NGINX node — the default response is the
phpinfo()page.
Configuration
Upload size is governed at the NGINX layer. To allow larger request bodies:
- Click Config next to the NGINX node to open the file manager.
- Open
/etc/nginx/nginx.confand add a directive inside thehttpblock:
client_max_body_size 50m;
- Save and click Restart Nodes.
The platform’s built-in file manager has a 150MB ceiling regardless of client_max_body_size. For larger files, attach a public IP and use FTP, SFTP, or your own transfer tool.
PHP-side limits (upload_max_filesize, post_max_size) live in /etc/php.ini and need to align with client_max_body_size.
See also
- NGINX module management on the PaaS
- Caching on the NGINX PHP stack
- PHP version selection and
php.inireference