1.下载并执行LNMP一键安装包 、
2.配置相关错误解决
nginx访问php页面access denied(403)错误问题
修改php配置文件,cgi.fix_pathinfo = 1
server {
listen 80;
server_name 192.168.11.198;
index index.php index.html index.htm;
root /home/wwwroot
location ~ \.php($|/){
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
}
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
access_log /home/wwwlogs/access_sg.log access;
}
阅读(1721) | 评论(0) | 转发(0) |