PHP-FPM
Use PHP-FPM for PHP apps while Fluxheim serves static assets and forwards PHP requests safely.
External PHP-FPM pool
[vhosts.php]
enabled = true
root = "/srv/app/public"
index = "index.php"
[vhosts.php.fpm]
mode = "external"
socket = "/run/php-fpm/app.sock"
Endpoint choices
| Mode | Use it when |
|---|---|
socket | Fluxheim and PHP-FPM run on the same host. |
tcp | PHP-FPM runs in another container or host. |
tcp_upstreams | You want simple safe-method failover across PHP-FPM pools. |
managed | Fluxheim should start and supervise a private PHP-FPM master. |
Managed PHP-FPM
[vhosts.php.fpm]
mode = "managed"
php_fpm_binary = "/usr/sbin/php-fpm"
socket_dir = "/run/fluxheim/php"
workers = 4
process_manager = "dynamic"
start_servers = 2
min_spare_servers = 1
max_spare_servers = 4
Managed mode lets Fluxheim start a private php-fpm master for the vhost. Use it when you want Fluxheim to own the socket and generated pool files.
PHP safety controls
- Keep PHP files inside the configured root.
- Serve static assets directly when possible.
- Never expose PHP source when PHP execution fails.
- Deny PHP execution in upload directories.
- Use request and response byte limits for untrusted applications.