openresty 1.15.8.1

官方:https://openresty.org/en/

一 简介

OpenResty® is a dynamic web platform based on NGINX and LuaJIT.

openresty是一个基于nginx和luajit的动态web平台;

OpenResty® is a full-fledged web platform that integrates the standard Nginx core, LuaJIT, many carefully written Lua libraries, lots of high quality 3rd-party Nginx modules, and most of their external dependencies. It is designed to help developers easily build scalable web applications, web services, and dynamic web gateways.

openresty是一个丰富的web平台,将标准nginx内核、luajit、多个lua库,多个第三方nginx模块以及依赖整合在一起;

By taking advantage of various well-designed Nginx modules (most of which are developed by the OpenResty team themselves), OpenResty® effectively turns the nginx server into a powerful web app server, in which the web developers can use the Lua programming language to script various existing nginx C modules and Lua modules and construct extremely high-performance web applications that are capable to handle 10K ~ 1000K+ connections in a single box.

利用设计良好的nginx模块,openresty将nginx高效的变为一个web应用服务器,开发者可以通过lua来调用nginx模块和lua模块,并且构建极端高效的web应用,轻松应用10k-1000k的连接数;

OpenResty® aims to run your server-side web app completely in the Nginx server, leveraging Nginx's event model to do non-blocking I/O not only with the HTTP clients, but also with remote backends like MySQL, PostgreSQL, Memcached, and Redis.

openresty使你的服务端应用完全运行在nginx上,并且将nginx的事件模型应用到很多方面;

Real-world applications of OpenResty® range from dynamic web portals and web gateways, web application firewalls, web service platforms for mobile apps/advertising/distributed storage/data analytics, to full-fledged dynamic web applications and web sites. The hardware used to run OpenResty® also ranges from very big metals to embedded devices with very limited resources. It is not uncommon for our production users to serve billions of requests daily for millions of active users with just a handful of machines.

OpenResty® is not an Nginx fork. It is just a software bundle. Most of the patches applied to the Nginx core in OpenResty® have already been submitted to the official Nginx team and most of the patches submitted have also been accepted. We are trying hard not to fork Nginx and always to use the latest best Nginx core from the official Nginx team.

openresty不是一个nginx分支,它只是一个软件的组合包;

二 安装

1 tar包编译安装

tar -xvf openresty-VERSION.tar.gz
cd openresty-VERSION/
./configure -j2
make -j2
sudo make install

参考:https://openresty.org/en/installation.html

2 docker安装

$ docker run -d --name resty -p 80:80 host openresty/openresty

参考:https://hub.docker.com/r/openresty/openresty

三 使用

访问:http://127.0.0.1:80

默认的nginx.conf位于 /usr/local/openresty/nginx/conf/nginx.conf (不是 /etc/nginx/nginx.conf),默认会加载所有/etc/nginx/conf.d/下的配置文件

include /etc/nginx/conf.d/*.conf;

准备测试配置

# cat testlua.conf

server {

listen 80;

server_name testlua;

location / {

default_type text/html;

content_by_lua '

ngx.say("<p>hello, world</p>")

';

}

}

启动

# docker run -d --name resty -p 80:80 -v /path/testlua.conf:/etc/nginx/conf.d/testlua.conf openresty/openresty

测试

# curl http://testlua -x 127.0.0.1:80
<p>hello, world</p>

最新文章

  1. java 中多线程的同步函数的运用
  2. [diango]理解django视图工作原理
  3. Nubia Z9 mini使用体验
  4. hadoop实战 -- 网站日志KPI指标分析
  5. 【WP8.1开发】选择与搜索联系人
  6. 2014年2月份第3周51Aspx源码发布详情
  7. HDU 2066 一个人的旅行 - from lanshui_Yang
  8. requirejs--源码分析
  9. QT在ui文件上建立信号操机制会不会对后期维护产生影响 - love4Mario的专栏 - 博客频道 - CSDN.NETQT在ui文件上建立信号操机制会不会对后期维护产生影响 - love4Mario的专栏 - 博客频道 - CSDN.NET
  10. Hadoop从入门到精通系列之--0.Hadoop生态体系
  11. json模块&amp;xml
  12. JavaScript编码风格
  13. 01-配置java开发环境
  14. 查找nginx安装的路径以及相关安装操作命令
  15. 无法在Word中打开MathType怎么办
  16. c++11实现optional
  17. JavaScript进阶内容笔记1:各种对象类型判断
  18. 使用非root用户启动tomcat
  19. 第二百四十七节,Bootstrap按钮和折叠插件
  20. Go语言 map的实现

热门文章

  1. vue-router中query与params区别
  2. git步骤
  3. FormatMessage
  4. ASP.NET Web API 2 使用 DelegatingHandler(委托处理程序)实现签名认证
  5. tcp_connect函数
  6. 【LeetCode】89.Gary Code
  7. springboo05-redis
  8. ImportError: libcudnn.so.5: cannot open shared object file: No such file or directory
  9. Django之CRM项目Day3-客户展示及分页
  10. 虚拟环境jupyter notebook使用【virtualenv环境】