OpenResty(5)--PHP
来源:互联网 发布:阿里云呼叫中心 编辑:程序博客网 时间:2024/03/28 23:52
OpenResty集成PHP
本例:Ubuntu OS
1.install php5
apt-get install php5
2.install php5-fpm
apt-get install php5-fpm
3.update php5-fpm listen
cd /etc/php5/fpm/pool.d
vim www.conf
;listen = /var/run/php5-fpm.sock
listen = 127.0.0.1:9000
4.update nginx.conf
cd /usr/local/openresty/nginx/conf
vim nginx.conf
在server里增加
location ~\.php$ { root /var/www; fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; include fastcgi_params;}
5.add /var/www directory
mkdir /var/www
6.add index.php
cd /var/www
vim index.php
<?php phpinfo();?>
7.start php5-fpm & restart nginx
/etc/init.d/php5-fpm
/usr/local/openresty/nginx/sbin/nginx -s reload
lsof -i:9000
curl http://localhost/index.php
0 0
- OpenResty(5)--PHP
- openresty php luajit
- openresty解析php
- php+memcache和openresty+memcache
- CentOS6.5 安装 Openresty
- centos6.5-----openresty安装
- openresty
- OpenResty
- openresty
- openresty
- openresty
- centos+openresty+mariaDB+php搭建web服务器
- CentOS 6.7构建 OpenResty(Nginx)+PHP 7(php-fpm)+MySQL5.7 运行环境
- centos6.5 openresty make[1] 编译出错解决方法
- Openresty最佳案例 | 第5篇:http和C_json模块
- OpenResty 最佳实践学习--实战演习笔记(5)
- Openresty 安装
- 配置openresty
- CMake 2.8+ VS2010 failed to config
- ASCII码表
- 互联网协议入门(一)
- 跟我一起学JQuery插件开发教程 (超赞的文章)
- jdk环境变量配置
- OpenResty(5)--PHP
- Zigbee协议栈z-stack中无线数据包格式结构体afIncomingMSGPacket_t
- android.database.StaleDataException: Attempted to access a cursor after it has been clos
- Windows Server 2008中安装IIS7.0
- eclipse svn 会报 文件夹 "" 已不存在.(转)
- ARC forbids explicit message send of ‘dealloc’的解决方案
- VS2012里的控制台应用程序闪退
- 互联网协议入门(二)
- stm32库函数学习篇----通用定时器(PWM功能)