[root@localhost ~]# vi /usr/local/nginx/conf/nginx.conf
location / {
root html;
index index.html index.htm index.php;
}
location ~ \.php$ {
root html;
index index.html index.htm;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html$fastcgi_script_name;
include fastcgi_params;
}
本文详细介绍了如何在Nginx服务器中配置文件,实现对PHP请求的正确处理,包括路径设置、FastCGI参数配置等关键步骤。
949

被折叠的 条评论
为什么被折叠?



