Nginx处理PHP请求

流程图:
image

Yum install  php*  -y     #安装php及相关的依赖包定义php环境
Vim /etc/php-fpm.d/www.conf  

image

Systemctl start php-fpm /  systemctl restart  php-fpm    #启动或者重启php-fpm
Netstat -anput |grep 9000  #看看9000端口是否开启来了
Vim  /etc/nginx/nginx.conf

image
在/etc/nginx/目录中有一个文件叫做fastcgi_params ##看看就行不用去改动它 上面nginx.conf中的include fastcgi_params就是引入这个文件
image
重启nginx

测试:
因为我之前配置了wordpress所以这里我就直接去调用wordpress了
image
image

posted @ 2025-11-15 16:22  hoopee  阅读(1)  评论(0)    收藏  举报