Serves static files and passes PHP to FPM
Serves static files and passes PHP to FPM. Every PHP project has one — Drupal, Laravel, WordPress or plain PHP — and a Node.js or Go project has none, because the application answers HTTP itself.
What it serves is decided by your project type, not by a setting:
| Project | Document root | Configuration |
|---|---|---|
| Drupal | web/ |
Drupal 11's, or Drupal 10's when runtime.drupal is '10' |
| Laravel | public/ |
Laravel's |
| WordPress | the repository root | WordPress's |
| PHP | public/ |
a plain PHP one |
The code is mounted read-only; uploads are served from the files directory that outlives the release. In front of Nginx is the platform's proxy, which terminates TLS and routes the hostname — or Varnish, when the stack runs it.
A slow request passes through Nginx before it reaches PHP, and whichever gives
up first answers. Raise NGINX_FASTCGI_READ_TIMEOUT together with
PHP_MAX_EXECUTION_TIME — see Service settings.
| Version | Status |
|---|---|
1.31 |
Supported, and the default |
1.30 |
Supported |
1.29 |
Deprecated — still runs, but move to something newer |
A deprecated version still runs and is still what some sites are on. It is listed so you can move before it goes, rather than finding out on the morning a build stops resolving it.
Pin the version, not the build: name 1.31 and the platform matches it to the
current build, so a security rebuild reaches you without anybody editing a
repository.
In vallic.yaml — what each one does is on Service settings:
services:
- nginx:
version: '1.31'
environment:
NGINX_CLIENT_MAX_BODY_SIZE: …
NGINX_KEEPALIVE_TIMEOUT: …
NGINX_FASTCGI_READ_TIMEOUT: …
NGINX_GZIP_COMP_LEVEL: …
NGINX_STATIC_EXPIRES: …
NGINX_ERROR_LOG_LEVEL: …
NGINX_DRUPAL_NOT_FOUND_REGEX: …
NGINX_WP_NOT_FOUND_REGEX: …
Anything not on this list refuses the deploy, naming the variable — rather than being accepted and quietly ignored.