-
编辑iptables策略 @@@(具体文档请联系本博主,首页有博主邮箱)@@@
vi /etc/sysconfig/iptables
添加下面两条参数 -
关闭SELINUX
-
重启系统
-
安装下载工具
-
下载
-
安装
-
更新yum源
-
安装nginx
-
设置nginx开机启动
-
重启nginx
-
安装yum源
-
安装php
-
安装php组件
-
将配置文件改为备份文件
-
由于原配置文件要自己去写因此可以使用默认的配置文件作为配置文件
-
修改nginx配置文件,添加fastcgi支持
vi /etc/nginx/nginx.conf
index index.php index.html index.htm;
//加入index.php -
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME$ document_root$fastcgi_script_name;
include fastcgi_params;
将以上代码注释去掉,并修改成nginx默认路径
18.修改php的配置文件
19.重启服务
20.在Nginx目录里创建测试页
21.搭建完成
本文转自 技术花妞妞 51CTO博客,原文链接:http://blog.51cto.com/xiaogongju/1940328