小编We0*_*We0的帖子

Nginx 1 FastCGI 在 stderr 中发送:“主脚本未知”

我第一次使用 Nginx,但我对 Apache 和 Linux 非常熟悉。我正在使用一个现有的项目,当我试图查看 index.php 时,我得到一个 404 文件未找到。

这是 access.log 条目:

2013/06/19 16:23:23 [error] 2216#0: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.ordercloud.lh"
Run Code Online (Sandbox Code Playgroud)

这是网站可用的文件:

server {
    set $host_path "/home/willem/git/console/www";
    access_log  /www/logs/console-access.log  main;

    server_name  console.ordercloud;
    root   $host_path/htdocs;
    set $yii_bootstrap "index.php";

    charset utf-8;

    location / {
        index  index.html $yii_bootstrap;
        try_files $uri $uri/ /$yii_bootstrap?$args;
    }

    location ~ ^/(protected|framework|themes/\w+/views) {
        deny  all;
    }

    #avoid …
Run Code Online (Sandbox Code Playgroud)

nginx php-fpm

107
推荐指数
5
解决办法
36万
查看次数

标签 统计

nginx ×1

php-fpm ×1