"Bad gateway" with nginx, PHP-FPM using FreeBSD socket
Apparently there is a bug in the PHP version shipped with FreeBSD; ServerFault user MafiaInc kindly provided the solution:
-
Edit the file /usr/local/etc/php-fpm.conf
-
Note the values of the user/group lines, e.g.:
user = wwwgroup = www -
Add these lines with the same values as the user/group lines:
listen.owner = wwwlisten.group = www -
Restart PHP-FPM using this command:
Terminal window service php-fpm restart