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

cmpan nginx-forum at
Wed Oct 31 15:40:58 UTC 2012

i think it would be a bug.
it's ok, if i set the document root as the top level folder,or like your
problem too.

        location ~ \.php$ {
            root           /web;    # ok
            #root           /web/htdocs; #  your problem
            fastcgi_index   index.php;
            fastcgi_param   SCRIPT_FILENAME 
            include         fastcgi_params;

i do't know how to  deal with.
the version is nginx-1.2.4

Posted at Nginx Forum:,230967,232432#msg-232432

More information about the nginx mailing list