PHP-FPM

Uża PHP-FPM għal apps PHP waqt li Fluxheim iservi assets statiċi u jibgħat talbiet PHP b’mod sikur.

Pool PHP-FPM estern

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

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

Għażliet tal-endpoint

ModUżah meta
socketFluxheim u PHP-FPM ħaddem on the same host.
tcpPHP-FPM runs in another container or host.
tcp_upstreamsYou want simple metodu-sikur failover across PHP-FPM pools.
managedFluxheim should start u supervise a privat 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.

Kontrolli tas-sikurezza PHP

  • Żomm fajls PHP ġewwa r-root konfigurata.
  • Servi assets statiċi direttament meta jkun possibbli.
  • Qatt tesponi s-sors PHP meta l-eżekuzzjoni PHP tfalli.
  • Deny PHP execution in upload direttorji.
  • Use talba u rispons byte limiti għal untrusted applications.
Malti