6030853a295953239.png_fo742.png
报错信息:

2021/03/21 06:07:35 [error] 23#23: *5 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 10.244.11.0, server: _, request: "GET /123.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "10.104.198.121"

解决:
在nginx配置文件中需要定义/root,然后用$document_root指定php文件路径
例如:

            root /app;
            index index.html index.php;

            location ~ \.php$ {
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                include        fastcgi_params;
            }

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code