nginx支持php的解析配置,

        user www-data;(注意此用户,如果注释掉,错误日志里面会出现连接php5-fpm失败,权限拒绝)

 

        location ~ \.php$ {
            root   html;
        #   fastcgi_split_path_info ^(.+\.php)(/.+)$;
        #   fastcgi_pass   127.0.0.1:9000;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;(此处要加上$document_root,否则找不到php文件)
            include        fastcgi_params;
        }