1

As I know, when I meet "File not fount" error from Nginx & php-fpm server,

I have to check the each process's owner:group.

Look below.

enter image description here

the owner for php-fpm process is 'nginx' and the owner for nginx process is 'nginx' and the owner of the file www.sock is 'nginx' too.

But my website has 'file not found' error yet. What should I check another?

-------- nginx conf -------

root         /home/gotoabc/pixel/www;
...
location ~* \.php$ {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;

    fastcgi_pass   unix:/var/run/php-fpm/www.sock;
    fastcgi_index  index.php;
    include        fastcgi_params;
    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    ...

------ /etc/php-fpm-7.2.d/www.conf ---------

user = nginx
group = hosting
...
listen = /var/run/php-fpm/www.sock
...
listen.owner = nginx
listen.group = hosting
listen.mode = 0660

-------- /home/gotoabc/pixel/www ---------

-rwxr-xr-x 1 gotoabc hosting   5878 Dec 11 03:09 index.php
Lawyer Kenny
  • 363
  • 4
  • 16
  • Please provide your nginx site config and your fpm pool config. – Jonnix Dec 11 '18 at 10:21
  • Possible duplicate of [Debugging the famous - FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream](https://stackoverflow.com/questions/35261922/debugging-the-famous-fastcgi-sent-in-stderr-primary-script-unknown-while-re) – Jonnix Dec 11 '18 at 12:39
  • Unsure if that ^^ will help, but shouldn't hurt. – Jonnix Dec 11 '18 at 12:40

0 Answers0