running php-fpm inside a FreeBSD jail
I had an issue while trying to run a php-fpm FastCGI process from a FreeBSD jail using nginx from the host. Like many others I experienced the infamous White Screen Of Death™ but no errors were logged at all (even with the full debug config all set from both php-fpm.conf and php.ini).
nginx.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # ... upstream princesse-bulldozer-php-fpm { server [2a01:4f8:120:5388:0:b:249:1]:9000; } server { listen *:80; listen [::]:80; # ... root /usr/jails/jail0.kaworu.ch/home/princesse-bulldozer.ch/wordpress; index index.php; # Pass all .php files onto a php-fpm/php-fcgi server. location ~ [^/]\.php(/|$) { fastcgi_index index.php; fastcgi_pass princesse-bulldozer-php-fpm; # fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME /home/princesse-bulldozer.ch/wordpress$fastcgi_script_name; include fastcgi_params; } } |
Hope it can avoid a couple of painful debugging out there :)
root
is correct.SCRIPT_FILENAME
path should not use$document_root
…