LoginSignup
4
3

More than 3 years have passed since last update.

docker+nginx+php-fpmでFastCGI sent in stderr

Posted at

表題の通りで下記エラーが発生

[error] 8#8: *25 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream

「Primary script unknown」で色々調べた所、nginx.confの設定で

fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
↓
fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;

という記事が多かったです、てかほとんどでしたが、原因が違いました。
もっと根本的な凡ミスでした。

!!nginxのボリュームと、php-fpmのボリュームのパスが違った。!!

nginxでは
/var/www/app/{アプリの中身いっぱい}

php-fpmでは
/var/www/{アプリの中身いっぱい}

でappが抜けててエラーが出ているようでした。

単純ですが時間かかったので記事に残しておきます。

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3