php-fpm在centos 6上的tengine中无法工作

时间:2017-07-21 03:57:42

标签: php nginx

我已安装 php-fpm tengine centos 6

这是我的 /usr/local/nginx/conf/nginx.conf

server {
    listen       80;
    server_name  localhost;

    location / {
        root   html;
        index  index.html index.htm;

    error_page  404              /404.html;

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

    location ~ \.php$ {
        proxy_pass   http://127.0.0.1;
    }


    location ~ \.php$ {
        root           html;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
    #   fastcgi_param  SCRIPT_FILENAME/$document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    location ~ /\.ht {
        deny  all;
    }
}

http://172.104.126.251/index.html工作!

但是

http://172.104.126.251/index.php无法正常工作,它会显示错误页面。

希望你们能帮助我,谢谢!

0 个答案:

没有答案