登录  /  注册
Nginx错误:FastCGI在读取上游的响应头时发送了stderr:"主要脚本未知"
P粉322319601
P粉322319601 2023-12-15 15:58:59
[PHP讨论组]

我有一个 yii2 高级模板应用程序在 centos 9 上运行,带有 nginx 和 php 8.1。设置虚拟主机配置如下:

server {
    lis ten 80;
    server_name mydomain.com;

    root /home/lamtab/xp-app-main/app/appadmin/web;
    index index.php index.html index.htm index.nginx-debian.html;

    access_log "/var/log/nginx/mydomain.com.access.log";
    error_log "/var/log/nginx/mydomain.com.error.log";

    location / {
       try_files $uri /index.php$is_args$args;
    }
   location ~* .php$ {
                # With php-fpm unix sockets
                fastcgi_pass unix:/run/php-fpm/www.sock;
                include         fastcgi_params;
                fastcgi_param   SCRIPT_FILENAME    $document_root$fastcgi_script_name;
                fastcgi_param   SCRIPT_NAME        $fastcgi_script_name;
        }
    fastcgi_buffers 8 16k;
    fastcgi_buffer_size 32k;
    fastcgi_connect_timeout 90;
    fastcgi_send_timeout 90;
    fastcgi_read_timeout 90;
}

域的错误日志报告

FastCGI 在 stderr 中发送:“主脚本未知”,同时从上游读取响应标头...”

以及nginx的错误日志报告

index.php”失败(13:权限被拒绝)

有什么线索吗?

P粉322319601
P粉322319601

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2024 //m.sbmmt.com/ All Rights Reserved | php.cn | 湘ICP备2023035733号