LNMP之php解析-成都快上网建站

LNMP之php解析

[root@LNMP ~]# vim /usr/local/nginx/conf/nginx.conf

成都创新互联公司是一家专注于网站制作、成都网站建设与策划设计,城中网站建设哪家好?成都创新互联公司做网站,专注于网站建设10多年,网设计领域的专业建站公司;建站业务涵盖:城中等地区。城中做网站价格咨询:18982081108

打开以下PHP 相关项且更改 scripts$fastcgi_script_name;> /usrlocal/nginx/html$fastcgi_script_name;

      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;

                                     #(scripts$fastcgi_script_name;)

            include        fastcgi_params;

更改完成以后,保存退出。通过 ip地址可以访问到 nginx  的首页。

如下图:(如果访问不了可以 尝试关掉linux 自带的防火墙 iptables -F)

LNMP之 php解析

[root@LNMP ~]# iptables -F

[root@LNMP ~]# cd /usr/local/nginx/html/  # 在此目录下写一个 info.php的脚本

[root@LNMP html]# ls

50x.html  index.html

[root@LNMP html]# vim info.php  # 编译一个 info.php 脚本

phpinfo();

?>

通过IP 可以访问到以下内容

LNMP之 php解析

至此PHP 解析测试成功。


网站名称:LNMP之php解析
文章起源:http://kswjz.com/article/igghjp.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流