PHP-FPM

Use PHP-FPM do PHP apps agus Fluxheim serves static assets agus forwards PHP iarratais safely.

Linn sheachtrach PHP-FPM

[vhosts.php]
enabled = true
root = "/srv/app/public"
index = "index.php"

[vhosts.php.fpm]
mode = "external"
socket = "/run/php-fpm/app.sock"

Roghanna endpoint

MódÚsáid é nuair
socketFluxheim agus PHP-FPM rith on the same host.
tcpPHP-FPM runs in another container or host.
tcp_upstreamsYou want simple modh-sábháilte failover across PHP-FPM pools.
managedFluxheim should start agus supervise a príobháideach 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.

Rialuithe sábháilteachta PHP

  • Keep PHP comhaid inside the configured root.
  • Freastal ar shócmhainní statacha go díreach nuair is féidir.
  • Never expose PHP foinse when PHP execution fails.
  • Deny PHP execution in upload eolairí.
  • Use iarratas agus freagra byte teorainneacha do untrusted applications.
Gaeilge