新聞中心
[root@LNMP ~]# vim /usr/local/nginx/conf/nginx.conf
成都創(chuàng)新互聯(lián)公司是一家專注于網站制作、成都網站建設與策劃設計,城中網站建設哪家好?成都創(chuàng)新互聯(lián)公司做網站,專注于網站建設10多年,網設計領域的專業(yè)建站公司;建站業(yè)務涵蓋:城中等地區(qū)。城中做網站價格咨詢: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)
[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 可以訪問到以下內容
至此PHP 解析測試成功。
網站欄目:LNMP之php解析
網頁路徑:http://www.ef60e0e.cn/article/igghjp.html