Need advice -> fastcgi_pass @nginx.conf

Nextcloud 17.0.1
Ubuntu 18.04
Nginx 1.14
PHP 7.2.24-ubuntu0.18.0.4:

Reading about that Nextcry-Php issue I decided to follow the instructions given here. I edited my configuration correspondingly.
A restart of nginx failed, as the php-handler was not defined.
So my guess was after comparing my old config to the new one, that fastcgi_pass could be the troublemaker and I add this line of my old config instead of the one listed in the instructions:

fastcgi_pass unix:/run/php/php7.2-fpm.sock;
#fastcgi_pass php-handler;

Now my NC is running again.

So my question is, why is a direct “call” to php-handler not working in my setup? I know this is a random question, as you don’t know my config, but maybe someone stumbled into the same issue and might want to give me a hint.
Oh and more important is to know if this setting is “safe” or could I still be hit by Nextcry with that funky fastcgi_pass parameter?

Cheers!

It does not work, because you are missing this part of the sample config:

upstream php-handler {
    server 127.0.0.1:9000;
    #server unix:/var/run/php/php7.2-fpm.sock;
}

So just php-handler would never work. Also unix sockets are slightly faster than network connections, because they have less overhead.

Thanks for your answer. My ngnix seems to starts up fine with and without the upstream php-handler option that you posted -I did not look into this deeply, but I see that some nc-users are using a configuration that actually use unix:var… instead of 127.0.0.1. Getting more and more confused :wink:

You only need an upstream block, if you don’t directly specify a server. So you can just keep your config.
Unix: means that a unix socket is used, which is like a file that can be at different locations. In debian the recommended path recently changed from /var/run to /run