Nextcloud version: 15.0.13
Operating system and version : Fedora 28
nginx version: nginx/1.12.1
PHP version: php:7.3-fpm-alpine3.10
The issue you are facing:
After updating my configuration to match the recommendations published after Urgent security issue in NGINX/php-fpm, my instance is not working.
- Browsing to it in browser returns the text “File not found”
- nginx
error.log
contains:*32965 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream
Is this the first time you’ve seen this error? Yes
Steps to replicate it:
- Have nextcloud’s 15.0 fpm-alpine docker image running with the FPM port exposed as
127.0.0.1:19000
- Install an nginx configuration derived from documentation
- Reload
nginx
and refresh the nextcloud page
the relevant sections (i guess) of the nginx configuration, included below:
location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
fastcgi_param HTTPS on;
fastcgi_param modHeadersAvailable true;
fastcgi_param front_controller_active true;
fastcgi_pass php-handler;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
}
The output of your Nextcloud log in Admin > Logging: does not load.
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'memcache.local' => '\\OC\\Memcache\\APCu',
'apps_paths' =>
array (
0 =>
array (
'path' => '/var/www/html/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/www/html/custom_apps',
'url' => '/custom_apps',
'writable' => true,
),
),
'instanceid' => 'ocs70lq4nqf1',
'trusted_domains' =>
array (
0 => 'files.fontkeming.fail',
),
'datadirectory' => '/var/www/html/data',
'overwrite.cli.url' => 'https://files.fontkeming.fail',
'dbtype' => 'pgsql',
'version' => '14.0.4.2',
'dbname' => 'nextcloud',
'dbtableprefix' => 'oc_',
'installed' => true,
'theme' => 'nextcloud-breeze-dark',
'loglevel' => 2,
'maintenance' => false,
);
The output of your nginx log in /var/log/nginx
:
2019/11/26 12:48:33 [error] 516#0: *32919 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 71.212.20.39, server: files.fontkeming.fail, request: "GET /index.php/204 HTTP/1.1", upstream: "fastcgi://127.0.0.1:19000", host: "files.fontkeming.fail"
2019/11/26 12:49:01 [error] 516#0: *32962 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 71.212.20.39, server: files.fontkeming.fail, request: "GET /index.php HTTP/2.0", upstream: "fastcgi://127.0.0.1:19000", host: "files.fontkeming.fail"
2019/11/26 12:49:02 [error] 516#0: *32965 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 71.212.20.39, server: files.fontkeming.fail, request: "GET /index.php HTTP/2.0", upstream: "fastcgi://127.0.0.1:19000", host: "files.fontkeming.fail"
2019/11/26 12:49:02 [error] 516#0: *32965 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 71.212.20.39, server: files.fontkeming.fail, request: "GET /favicon.ico HTTP/2.0", upstream: "fastcgi://127.0.0.1:19000", host: "files.fontkeming.fail"
2019/11/26 12:53:33 [error] 516#0: *33533 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 71.212.20.39, server: files.fontkeming.fail, request: "GET /index.php/204 HTTP/1.1", upstream: "fastcgi://127.0.0.1:19000", host: "files.fontkeming.fail"
2019/11/26 12:53:34 [error] 516#0: *33539 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 71.212.20.39, server: files.fontkeming.fail, request: "GET /index.php/204 HTTP/1.1", upstream: "fastcgi://127.0.0.1:19000", host: "files.fontkeming.fail"
2019/11/26 12:58:17 [error] 516#0: *34122 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 71.212.20.39, server: files.fontkeming.fail, request: "GET /index.php HTTP/2.0", upstream: "fastcgi://127.0.0.1:19000", host: "files.fontkeming.fail"
2019/11/26 13:00:03 [warn] 8203#0: could not build optimal types_hash, you should increase either types_hash_max_size: 2048 or types_hash_bucket_size: 64; ignoring types_hash_bucket_size