您的位置:首页 > 运维架构 > Nginx

CentOS 6.X 配置Nginx支持php-fpm模块

2017-08-08 14:08 696 查看
1、查找nginx配置文件

whereis nginx.conf   //查找nginx配置文件
cd /usr/local/nginx/conf/   //进入配置文件目录
vim nginx.conf    //编辑配置文件
//修改以下部分
location / {
root   html;
index  index.html index.htm index.php;
}
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;
}
//以上为修改的部分
/usr/local/nginx/sbin/nginx -s reload //重启nginx
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: