I am apparently not the only one with this problem, but after trying every suggested solution for couple I reached I point where I don't know what to do.
I am running Ubuntu 16.04, NGinx and PHP-FPM.
The nginx.conf is the default one, I only set a more informative log format.
The user rights seem to be okay: NGinx and PHP_FPM run under user www-data. Document-Root owner is www-data. FPM-Pool owner is www-data. Socket-file is there and writable.
I already tried setting folder- and file-permissions to the weakest (chmod 777): No result.
This is my server.conf, as you can see from commented lines, I tried a bunch of tricks - with no effect:
That's the fpm-pool config:
[www] listen = /run/php/php-fpm-$pool.sock user = www-data group = www-data listen.owner = www-data listen.group = www-data php_admin_flag[allow_url_fopen] = off php_admin_flag[allow_url_include] = off php_admin_value[memory_limit] = 128M pm = dynamic pm.max_children = 5 pm.start_servers = 1 pm.min_spare_servers = 1 pm.max_spare_servers = 3 chdir = / chroot = /var/www/nginx/ php_flag[display_errors] = on php_admin_value[error_log] = /var/log/fpm-php.www.log php_admin_flag[log_errors] = on catch_workers_output = yes
This is the output of the nginx' access.log:
/var/www/nginx/index.php > GET /index.php HTTP/1.1
And that's the actual error.log:
2018/08/29 17:34:27 [error] 24020#24020: *47 FastCGI sent in stderr: "Unable to open primary script: /var/www/nginx/index.php (No such file or directory)" while reading response header from upstream, client: 22.214.171.124, server: example.com, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm-www.sock:", host: "example.com:8080"