日期:2014-05-16  浏览次数:21040 次

Nginx php联合使用时Access denied. 问题

问题:Nginx php联合使用时Access denied. 问题

解决方案:http://apps.hi.baidu.com/share/detail/14619665

自己测试了一下:

location ~ \.php$ {
???? root
/opt/nginx/html;
???? fastcgi_pass 127.0.0.1:9000;
???? fastcgi_index index.php;
???? fastcgi_param SCRIPT_FILENAME /opt/nginx/html $fastcgi_script_name;
???? include fastcgi_params;

}

?注:红色部分一定要对应!

成功了!!!成功页面如附件所示!