標籤:php 解析測試
[[email protected] ~]# vim /usr/local/nginx/conf/nginx.conf
開啟以下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)
650) this.width=650;" src="http://s5.51cto.com/wyfs02/M01/89/B1/wKioL1gZ9a3RRhrHAAEOggX7_aM570.jpg" title="ng1.jpg" alt="wKioL1gZ9a3RRhrHAAEOggX7_aM570.jpg" />
[[email protected] ~]# iptables -F
[[email protected] ~]# cd /usr/local/nginx/html/ # 在此目錄下寫一個 info.php的指令碼
[[email protected] html]# ls
50x.html index.html
[[email protected] html]# vim info.php # 編譯一個 info.php 指令碼
<?php
phpinfo();
?>
通過IP 可以訪問到以下內容
650) this.width=650;" src="http://s4.51cto.com/wyfs02/M01/89/B3/wKiom1gZ91KgxvslAAJVePfEOkM864.jpg" title="ng2.jpg" alt="wKiom1gZ91KgxvslAAJVePfEOkM864.jpg" />
至此PHP 解析測試成功。
本文出自 “CBO#Boy_Linux之路” 部落格,請務必保留此出處http://20151213start.blog.51cto.com/9472657/1868730
LNMP之 php解析