RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
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://cqwzjz.cn/article/igghjp.html