nginx解析php CentOS 6.8 64位 腾讯云主机
分类:
文章
•
2023-01-03 00:14:12
1.vim /etc/php-fpm.d/www.conf进入php-fpm配置文件,将group 和user都改为nginx;
2.vim /etc/nginx/conf.d/ssl.conf已经配置好证书的文件:
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name;
include fastcgi_params;
}
3.cd /usr/share/nginx/html:
创建一个test.php:
<?php echo"hello world" ?>
4.用你的域名+test.php访问: