【笔记】Nginx配置解析PHP

前言

当完成PHP源码安装后,在Nginx中配置PHP的渲染

修改配置文件

  • 在Server中添加PHP的配置

fastcgi.conf:php-fpm的配置文件

1
2
3
4
5
6
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}

完成

参考文献

哔哩哔哩——千锋教育网络安全学院