fix logic for custom php-fpm in nginx