Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 为什么自制安装的nginx只提供默认文档根目录中的文件?_Php_Macos_Nginx_Homebrew - Fatal编程技术网

Php 为什么自制安装的nginx只提供默认文档根目录中的文件?

Php 为什么自制安装的nginx只提供默认文档根目录中的文件?,php,macos,nginx,homebrew,Php,Macos,Nginx,Homebrew,我通过自制在MacOSX上安装了nginx(带--fpm),但我不能让它提供php文件(html文件也可以)。以下是错误: [错误]46118#0:*1 kevent()报告connect()失败(61: 连接到上游时,客户端:127.0.0.1, 服务器:localhost,请求:“GET/HTTP/1.1”,上游: "fastcgi://127.0.0.1:9000,主机:“本地主机” 下面是我的站点配置文件 server { listen 80; root /Users

我通过自制在MacOSX上安装了nginx(带--fpm),但我不能让它提供php文件(html文件也可以)。以下是错误:

[错误]46118#0:*1 kevent()报告connect()失败(61: 连接到上游时,客户端:127.0.0.1, 服务器:localhost,请求:“GET/HTTP/1.1”,上游: "fastcgi://127.0.0.1:9000,主机:“本地主机”

下面是我的站点配置文件

server {
    listen  80;

    root /Users/me/Sites/test/public/;
    index index.html index.php;

    server_name localhost;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    error_page 404 /404.html;

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html;
    }

    error_log  /var/log/nginx/error.log;

    location ~ \.php$ {
       fastcgi_intercept_errors on;
       fastcgi_pass   127.0.0.1:9000;
       fastcgi_index  index.php;
       fastcgi_param  SCRIPT_FILENAME  /Users/me/Sites/test/public/scripts$fastcgi_script_name;
       include        /usr/local/etc/nginx/fastcgi_params;
    }
}
我不太熟悉fpm的设置。我做错了什么?谢谢你的帮助,坦克斯

环境: Mac OS X 10.10.2
nginx:1.6.2

您的php fpm服务器运行了吗?自从我升级到10.10.2后,出现了同样的问题