Technically, NGINX Unit was more than just PHP-FPM: The application server could integrate HTTP, routing, static files, and PHP execution. However, Unit is not a general alternative for new PHP hosting platforms, as the project has been archived since October 2025 and is no longer maintained. NGINX with PHP-FPM Therefore, the more transparent standard remains the preferred choice for new systems. "Unit" is primarily relevant for documented existing installations, risk analyses, and planned migrations.
"Archived" status and a clear, concise assessment
As of September 30, 2026, the verdict is clear: NGINX Unit It could execute PHP applications directly while accepting HTTP connections, terminating TLS, serving static files, and routing requests. As a result, its functionality went well beyond that of PHP-FPM. Nevertheless, Unit is not generally recommended for new production PHP hosting platforms because the official project has been archived since October 2025 and is no longer maintained.
This does not mean that an existing Unit installation would immediately become inoperable. It can continue to support an application as long as its dependencies, security measures, and a migration path are documented. However, a new investment must be evaluated differently: Without ongoing project maintenance, risks increase regarding security vulnerabilities, package availability, new operating system versions, and future PHP compatibility.
It is important to keep version numbers clearly separated. The installation documentation, which is still available, frequently refers to Unit 1.34.2, while the stable release tag 1.35.0 has been published. Among other things, this release confirms PHP 8.5 compatibility; however, this does not imply continued maintenance. The development branch master Because it has an "archived" status, it is not a relevant product version for operational decisions.
Distinguishing Between NGINX, PHP-FPM, and Unit
To make a sound decision, the components must be considered separately. NGINX is a web server and reverse proxy: It accepts HTTP requests, can serve static content, and forwards dynamic requests. PHP-FPM, on the other hand, is a FastCGI Process Manager. It provides PHP workers but does not itself handle the typical web server tasks of accepting and routing HTTP requests.
In the classic setup, a request first reaches NGINX. If it is a static file, NGINX can serve it immediately. For a PHP script, NGINX passes the required FastCGI parameters to a PHP-FPM pool; an available worker executes the code and returns the response via NGINX. Pool size and process mode are controlled in PHP-FPM via configuration files in the php.ini format.
Unit, on the other hand, was a Application Server with listeners, routes, static delivery, and language runtimes in a single JSON configuration model. A PHP application is integrated there as an application type; Unit can thus map the request path within the same platform, from acceptance to PHP execution. This does not automatically reduce operational risk, but it does change the boundaries of responsibility.
Unit is therefore not „NGINX with embedded PHP-FPM.“ When the PHP module is built, a separate SAPI module is created that is linked to the PHP-Embed library. Consequently, during analysis and migration, teams must not only transfer FastCGI settings but also remap routing, application definitions, module binding, and diagnostic paths. Errors cannot be attributed across the board to an upstream web server or a separate FPM pool.
PHP Modules, Versions, and Configuration Limits
For PHP, a Unit installation requires a compatible language module in addition to the core. This module is tied to the PHP version being used and the Unit installation. If no suitable packages were available for the operating system and PHP version, the documentation described how to build it yourself using a PHP installation that provides the Embed SAPI. This significantly increases the effort required for updates, reproducible builds, and error analysis.
The configuration also follows different models. Unit bundles listeners, routes, and applications as JSON data via its configuration interface. PHP-FPM, on the other hand, manages pools in files in the php.ini format. This difference goes beyond syntax: In an FPM stack, web server rules and PHP pool definitions are separate, whereas Unit integrates both more closely within a single platform. Migration strategies must take this structure into account.
For PHP directives, Unit distinguishes between the following sections: admin and user. Admin options correspond to PHP_INI_SYSTEM and cannot be modified by the application at runtime; user options correspond to PHP_INI_USER. However, Unit does not extend the permissible range of a PHP directive. Whether a setting may be set in this way or modified by application code is still determined by its PHP configuration mode.
Warning: The PHP 8.5 compatibility listed in Unit 1.35.0 only confirms support for this version in the latest stable release. It does not constitute a promise of future security fixes or updates to the Unit PHP module. For production environments, the exact Unit tag, PHP version, module source, and a tested migration path should therefore be documented as interdependent requirements.
Configuring PHP Routing and the Front Controller
A unit configuration connects a listener to routes and an application. For a local demo, the listener can be configured to use only 127.0.0.1:8080 listen. A route first attempts to find the requested file under /srv/example-app/public to be served statically. PHP files are excluded from this serving via the MIME type exclusion and are passed on to the PHP application; the same applies to nonexistent files. This ensures that public files and application execution remain traceable as separate steps.
In the application, it specifies root specifies the document directory, while type: php selects the PHP runtime. With script: index.php Every request forwarded to the application is routed to this script. This corresponds to the Front Controller Many PHP frameworks: The application evaluates the original path itself and determines, for example, which controller or error page to use.
Without that attitude script The Unit module processes URI-based script paths. This may be suitable for older applications where PHP files need to be called directly, but it requires careful restriction of the accessible paths. targets They also allow for subdirectories with different root, script, or index behavior. Therefore, they are not a substitute for routing, but rather a way to define multiple application rules in a targeted manner.
The following example is a JSON configuration file for a local demo, not for a public service. It contains no domain names, TLS settings, or login credentials. Before implementing it, you must verify the file permissions, the PHP support actually installed, and the method intended for Unit to import the configuration.
The order is crucial: The static delivery The share step is attempted before the fallback, but explicitly excludes PHP files. These requests and nonexistent files are directed to index.php; this also allows "friendly" URLs to work, such as /artikel/beispiel without a file of the same name. Whether additional rules are needed for upload directories, administrative areas, or directly accessible PHP files depends on the specific application and should not be generalized based on this demo.
Compare Process Models and RAM Budgets
PHP-FPM controls the number of workers per pool using the following modes static, dynamic and ondemand. With Unit, on the other hand, the process count is modeled within the application. A dynamic Unit configuration limits this with processes.max the total number and keeps up with processes.spare Idle processes; idle_timeout clears out excess inactive processes.
| mechanism | PHP-FPM | Unit | Operational Impact | Border |
|---|---|---|---|---|
| Fixed Number of Workers | pm = static | processes with a fixed number | Capacity is defined in advance. | Idling continues to consume memory. |
| Dynamic Workers | pm = dynamic; upper limit set by pm.max_children | processes.max and processes.spare | Capacity can be based on demand. | The upper limit must match the amount of available RAM. |
| Start as needed | pm = ondemand | There is no mode with exactly the same name; process settings determine the unit's behavior | Can reduce idle processes. | Start-up behavior and load profile must be monitored. |
| Reducing Idling | Pool parameters for the selected FPM mode | idle_timeout | Unnecessary processes can be terminated. | Not a substitute for capacity planning. |
The terms are therefore not interchangeable on a one-to-one basis. In particular, a documented default setting is not a suitable value for a website. Both pm.max_children as well as processes.max They limit concurrent PHP processing and can cause queues if the values are set too low. On the other hand, values that are too high compete with the operating system, database, cache, and other services for memory.
A RAM Budget This is initially just a planning model: Reserves for the operating system, database, cache, and other processes are deducted from the total memory. The remaining value is divided by a conservative estimate of memory requirements per PHP worker. For example, 1,200 MiB for PHP divided by 120 MiB per worker results in ten workers; both values are deliberately chosen placeholders, not actual measurements or configuration recommendations.
The result is a Upper limit and a starting point for observation, not the correct setting. What matters are actual peak values, queues, response errors, and memory usage under typical and high loads. For the methodical derivation and fine-tuning of pm.max_children The internal post helps Calculating the Appropriate Number of PHP-FPM Children. The same principle applies to Unit, even though the parameters have different names.
Warning: Setting process limits simply by adopting figures from other sources often just shifts the problem elsewhere. Only a clearly defined memory budget and regular monitoring can determine whether a worker limit is appropriate for the application, its extensions, and the services running concurrently.
Evaluating Business Models for PHP Hosting
| Model and Architecture | PHP Execution and Processes | Configuration and Runtimes | Maintenance Status | Suitable Application | Key limitation |
|---|---|---|---|---|---|
| NGINX plus PHP-FPM; separate web and PHP layers | NGINX forwards PHP requests to FPM pools via FastCGI; FPM offers static, dynamic, and on-demand modes. | Web server configuration plus pool files in php.ini format; optimized for PHP. | PHP-FPM is part of the PHP distribution. | Standard for new PHP hosting environments. | Two components and their interface must be operated. |
| NGINX Unit 1.35.0; Application Server with Listeners and Applications | Unit executes PHP through its language module and manages application processes. | Centralized JSON configuration; platform for multiple runtimes. | Last stable release: 1.35.0; the project has been archived. | Existing environment or a deliberately isolated special environment. | No ongoing project maintenance; be aware of module and version dependencies. |
| Apache HTTP Server with PHP-FPM; Web Server and External PHP Layer | Apache passes PHP to FPM pools. | Apache configuration plus FPM pool files; optimized for PHP. | PHP-FPM is part of the PHP distribution. | Environments with Apache-specific requirements. | Two components and their interface must be operated. |
The table categorizes architectures, not speed or memory usage. The main argument in favor of new PHP hosting with the NGINX-PHP-FPM setup is the clear separation: The web server handles HTTP, proxying, and static content, while PHP-FPM manages the PHP workers per pool. This division of responsibilities makes it easier to evaluate configurations, error patterns, and updates separately.
Unit was able to bundle listeners, routing, static files, and applications into a single platform and support additional runtimes in addition to PHP. This multi-language approach may explain why an existing environment chose Unit. However, for exclusively PHP-based offerings, it is not automatically an advantage: It does not replace the need to evaluate the required features or to assess whether the team can master the different configuration and operational logic over the long term.
For Unit 1.35.0, the technical scope of functionality must be defined by the Maintenance Status be separated. The release date indicates the published version and its changes; this means that the project, which has since been archived, will no longer be maintained. When making a new decision, this distinction carries more weight than a smaller number of visible components. For an existing installation, however, it serves as a reason to document dependencies and a migration path.
Apache with PHP-FPM is not inherently a better or worse alternative, but rather an option when Apache is required. The choice should be based on maintainability, available PHP versions, patching processes, team expertise, and the fallback plan. Without comparable load profiles and documented measurement methods, it is not possible to derive a reliable performance ranking from this architectural overview.
Operate the unit safely as part of the fleet
An existing Unit installation should first be recorded as an as-is system, not as a template for a new platform. The key factors are the version actually in use, the connected applications, and their dependencies. The fact that Unit is still technically executable does not change the fact that the project has been archived; therefore, its continued operation and replacement must be planned together.
With WordPress, Joomla, or Drupal, the Front Controller The key point: Paths that do not correspond to existing files must be routed to the central PHP entry file, while existing files can be served directly. The WordPress guide for Unit demonstrates this routing principle, including the handling of PHP files and /wp-admin/. For an existing CMS, this may be a reasonable configuration; for a new installation, however, this does not imply a recommendation for Unit.
Unit allowed us to bundle several small applications built with PHP, Python, Ruby, or Node.js into a single platform using listeners, routes, and runtimes. This may explain why an existing architecture opted for Unit at the time. However, in the case of pure PHP hosting, this multi-language capability is not an end in itself: Separate, well-maintained components may be easier to maintain in the long run, despite the need for additional interfaces.
A frozen container deployment requires a particularly detailed inventory. To do this, document the exact unit tag, the PHP version, the installed language module, the base image, and the complete configuration. Also include sources for images and packages, the patching process, and a tested migration and fallback path. PHP compatibility for a specific unit release does not guarantee that the associated module will receive security updates in the future.
NGINX can be deployed in front of Unit, for example, if an existing NGINX layer needs to be retained or if certain requests need to be routed through it. The Unit documentation also mentions this integration in the context of securing the control socket. However, it does not resolve the archived status and creates an additional service with its own configuration, logging, and update responsibilities. The benefits must therefore be carefully weighed against this operational overhead.
Timeouts, Logs, and Stalled Processes
Process limits are not a form of error diagnosis. With limits.requests Unit can replace an application process after a specified number of requests have been processed. This can limit cumulative memory usage over time, but it does not eliminate memory leaks, oversized data structures, or blocking external calls. Therefore, a regular restart should not be considered proof of stable application code.
With limits.timeout Unit terminates a request with an HTTP 503 status code after the configured time has elapsed. This serves as a visible safeguard for individual requests, but it does not provide complete protection against frozen workers: According to the documentation, Unit does not detect frozen processes; they may remain in the process pool. A longer timeout merely postpones this problem, while a shorter one may terminate normally slow operations.
- Record HTTP status codes, affected paths, time windows, and frequency before changing threshold values.
- Consolidate access, error, and application logs based on timestamps; with PHP-FPM, a slowlog can provide additional stack traces.
- Check the CPU, RAM, I/O, network connections, and the status and number of processes.
- Next, investigate the code, database queries, file system accesses, and external services as possible causes.
- Only once the cause and load profile are known should you make targeted adjustments to timeouts, process limits, or restart rules.
An HTTP 503 error can therefore indicate that a timeout has occurred, but it can also be caused by upstream components or other errors. You should not rely solely on adjusting the number of workers to handle recurring long PHP requests. The guide to PHP-FPM Slowlog and Analyzing the Causes of Slow Requests shows how stack traces can be linked to request data; the same cause-and-effect logic is also useful in a unit analysis.
Symptoms without a clear resolution are particularly critical: increasing wait times, processes that remain occupied indefinitely, or a lack of log progress. In such cases, the process state and dependencies are more important than a blanket increase in the timeout. For example, check whether a PHP worker is waiting for database, DNS, filesystem, or network I/O. Only the specific cause of the blockage determines whether a code fix, a resource adjustment, or a controlled restart is appropriate.
Decision on New and Old Systems
For new PHP hosting environments, a well-maintained web server with PHP-FPM is the more logical default choice. PHP-FPM is part of the standard PHP distribution and provides documented pool and process manager options. With Unit, however, the focus shifts from mere functionality to maintainability: The installation can continue to run, but the archived project status increases the risk of long-term dependency.
For existing unit systems, an informed decision begins with an inventory. Check the maintenance status and patchability of the operating system, PHP, and base image; the compatibility of the installed language module; existing operational knowledge; and linked services. Equally important are exportable configurations, a reproducible rollback, and a target system to which routing, PHP settings, and deployments can be transferred step by step.
A migration does not require an arbitrary, one-size-fits-all deadline, but rather a prioritized sequence. Applications exposed to the Internet, images that cannot be updated, modules of unclear origin, and business-critical applications without a fallback plan deserve priority attention. After that, applications can be grouped based on complexity and dependencies. Running systems in parallel during a controlled transition can reduce risks, provided that data storage, sessions, and the fallback procedure are defined in advance.
The Control API is an administrative access point and not a standard website endpoint. Unit documents a Unix domain socket for you and justifies its use on security grounds. Set restrictive file permissions and clearly defined administrative access rights; if this were publicly accessible, attackers who successfully gained access would have extensive opportunities to modify the configuration.
The practical migration path does not end with a new process configuration. Migrate the PHP version, extensions, environment variables, file permissions, routing rules, and observability to the target system on a per-application basis. In doing so, compare expected responses and error cases rather than making blanket judgments about speed. This transforms an unplanned legacy issue into a documented Exit Strategy with well-reasoned technical decisions.
Sources and Current State of Knowledge
Status of the research:
Research date: September 30, 2026. NGINX Unit has been archived since October 2025. The installation documentation that is still available references version 1.34.2 in some places; statements regarding PHP 8.5 compatibility refer exclusively to the stable release version 1.35.0.
https://github.com/nginx/unit/releases
https://unit.nginx.org/installation/
https://www.php.net/manual/en/install.fpm.configuration.php
https://unit.nginx.org/configuration/?platform=docker
https://unit.nginx.org/howto/source/
https://unit.nginx.org/
https://github.com/nginx/unit/blob/master/CHANGES
https://unit.nginx.org/howto/wordpress/
https://unit.nginx.org/howto/integration/
https://unit.nginx.org/controlapi/




