1.在nginx的conf下配置lua.conf。。。。。。vi lua.conf

server {
listen ;
server_name _; location /lua {
default_type 'text/html';
lua_code_cache off;
content_by_lua_file /usr/local/openrestry/lua/test.lua;
}
}

2.在nginx.conf配置指向lua.conf,在nginx.conf的http内配置,路径根据自己情况定义

http {
include mime.types;
default_type application/octet-stream;
//.....
lua_package_path "/usr/local/openresty/lualib/?.lua;;";
lua_package_cpath "/usr/servers/openresty/?.so;;";
include lua.conf;
}

nginx.conf添加lua.conf配置的更多相关文章

  1. nginx.conf 集群完整配置

    ###############################nginx.conf 集群完整配置############################### #user nobody; # user ...

  2. Nginx添加Lua扩展模块

    Nginx添加Lua扩展模块 编译安装LuaJIT wget http://luajit.org/download/LuaJIT-2.0.4.tar.gz tar xf LuaJIT-.tar.gz ...

  3. nginx: [emerg] unknown directive "stub_status" in /home/oscf/nginx/conf/conf.d/ngx_metric.conf

    解压安装过程命令如下: cd /home/oscf #该目录下有nginx压缩包 mkdir nginx tar -zxvf nginx-1.16.0.tar.gz cd nginx-1.16.0 . ...

  4. nginx+lua安装配置

    1.选定源码目录选定目录 /usr/local/ cd /usr/local/ 2.安装PCRE库cd /usr/local/wget ftp://ftp.csx.cam.ac.uk/pub/soft ...

  5. centos LNMP第一部分环境搭建 LAMP LNMP安装先后顺序 php安装 安装nginx 编写nginx启动脚本 懒汉模式 mv /usr/php/{p.conf.default,p.conf} php运行方式SAPI介绍 第二十三节课

    centos  LNMP第一部分环境搭建 LAMP安装先后顺序  LNMP安装先后顺序 php安装 安装nginx  编写nginx启动脚本   懒汉模式  mv   /usr/local/php/{ ...

  6. Nginx配置文件 nginx.conf 和default.conf 讲解

    nginx.conf /etc/nginx/nginx.conf ######Nginx配置文件nginx.conf中文详解##### #定义Nginx运行的用户和用户组 user www www; ...

  7. nginx: [emerg] unknown directive “ ” in /usr/local/nginx/conf/vhost/XXX.conf:53报错处理

    开发同事发给我一小段nginx配置,加到服务器上之后,执行nginx -s reload时,出现报错: nginx: [emerg] unknown directive “ ” in /usr/loc ...

  8. Apache2.4.6添加虚拟主机提示:NameVirtualHost has no effect and will be removed in the next release /usr/local/apache/conf/extra/httpd-vhosts.conf

    [root@localhost conf]# service httpd restart 停止 httpd: [确定] 启动 httpd:AH00548: NameVirtualHost has no ...

  9. /etc/security/limits.conf 详解与配置

    目录 一. /etc/security/limits.conf 详解 /etc/security/limits.conf 配置解析 /etc/security/limits.d/ 目录 二. ulim ...

随机推荐

  1. 修改LINUX的时区。

    新装的机器(redhat7)有几台时区不对: 百度了之后找到了以下解决方法输入 tz    依次选择Asia China  east China  Yes 1  然后 export TZ 新开对话发现 ...

  2. C++雾中风景9:emplace_back与可变长模板

    C++11的版本在vector容器添加了emplace_back方法,相对于原先的push_back方法能够在一定程度上提升vector容器的表现性能.所以我们从STL源码角度来切入,看看这两种方法有 ...

  3. JVM学习②

    JVM运行机制 1.JVM启动流程 Java启动命令->装载配置寻找jvm.cfg->根据配置寻找JVM.dll(JVM主要实现)->初始化JVM,获得JNIEnv接口 2.JVM基 ...

  4. Java 学习笔记 (二) Selenium WebDriver Java 弹出框

    下面这段实例实现了以下功能: 1. profile使用用户本地电脑上的 (selenium 3有问题.因为selenium 3把profile复制到一个temp文件夹里,但并不复制回去.所以每次打开仍 ...

  5. 如何添加“在这里打开PowerShell”到Windows中的上下文菜单

    It was only a matter of time, right? Due to my recent infatuation passionate love affair with PowerS ...

  6. mac下安装Maven和配置环境变量

    1.下载maven包: 下载链接:

  7. Golang 通用连接池库 Golang-Pool

    Golang 实现的连接池 功能: * 连接池中连接类型为interface{},使得更加通用 * 链接的最大空闲时间,超时的链接将关闭丢弃,可避免空闲时链接自动失效问题 * 使用channel处理池 ...

  8. 全文检索选择-------- Elasticsearch与Solr

    Elasticsearch简介* Elasticsearch是一个实时的分布式搜索和分析引擎.它可以帮助你用前所未有的速度去处理大规模数据. 它可以用于全文搜索,结构化搜索以及分析,当然你也可以将这三 ...

  9. html中 submit和button的区别?

    前者是向数据库提交表单 后者是单纯的按钮功能

  10. iPhone6 AirDrop找不到我的mac解决方法!注销mac和iPhone的icloud账号

    注销mac和iPhone的icloud账号,icloud 会自动同步个人热点,个人热点开启状态,mac 和 iPhone 无法看到对方!