首页 > 代码库 > 解析 PHP

解析 PHP

[root@localhost ~]# vim /usr/local/nginx/conf/nginx.conf +65 location ~ \.php$ {     root           html;                 # 打开该段配置并修改为如下蓝色部分     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; }
[root@localhost ~]# /usr/local/nginx/sbin/nginx -t[root@localhost ~]# /usr/local/nginx/sbin/nginx -s reload
[root@localhost ~]# vim /usr/local/nginx/html/index.php<?phpphpinfo();?>

访问 192.168.123.102/index.php 看是否能够解析:

技术分享

 

 

 

 

    

解析 PHP