FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream

Sergey Budnevitch sb at waeme.net
Mon Sep 24 10:30:53 UTC 2012


On 24  Sep2012, at 03:40 , chatchat <nginx-forum at nginx.us> wrote:

> Hello,
> 
> I went to setup Nginx with php-fpm.
> 
> I have3 vhosts for the moment .
> I made a script to create vhost and pool file for php-fpm.

According to your configs, php chroot into /home/domain/ directory,
and SCRIPT_FILENAME in case of /phpinfo.php is setted to /home/domain/www/phpinfo.php.
So php look for php script file with relative path /home/domain/www/phpinfo.php and
absolute path /home/domain/home/domain/www/phpinfo.php and can not find it.

> 
> I don't know why but my firsts 2 vhosts work but not the third, i obtain
> this message in a blank page :
> File not found.
> 
> So, in my log error file :
> 2012/09/24 00:57:12 [error] 23782#0: *422 FastCGI sent in stderr: "Primary
> script unknown" while reading response header from upstream, client:
> XX.XX.XX.XX, server: domain.com, request: "GET /phpinfo.php HTTP/1.1",
> upstream: "fastcgi://127.0.0.1:9003", host: "www.domain.com"



More information about the nginx mailing list