nginx.conf添加lua.conf配置
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配置的更多相关文章
- nginx.conf 集群完整配置
###############################nginx.conf 集群完整配置############################### #user nobody; # user ...
- Nginx添加Lua扩展模块
Nginx添加Lua扩展模块 编译安装LuaJIT wget http://luajit.org/download/LuaJIT-2.0.4.tar.gz tar xf LuaJIT-.tar.gz ...
- 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 . ...
- nginx+lua安装配置
1.选定源码目录选定目录 /usr/local/ cd /usr/local/ 2.安装PCRE库cd /usr/local/wget ftp://ftp.csx.cam.ac.uk/pub/soft ...
- 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/{ ...
- Nginx配置文件 nginx.conf 和default.conf 讲解
nginx.conf /etc/nginx/nginx.conf ######Nginx配置文件nginx.conf中文详解##### #定义Nginx运行的用户和用户组 user www www; ...
- nginx: [emerg] unknown directive “ ” in /usr/local/nginx/conf/vhost/XXX.conf:53报错处理
开发同事发给我一小段nginx配置,加到服务器上之后,执行nginx -s reload时,出现报错: nginx: [emerg] unknown directive “ ” in /usr/loc ...
- 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 ...
- /etc/security/limits.conf 详解与配置
目录 一. /etc/security/limits.conf 详解 /etc/security/limits.conf 配置解析 /etc/security/limits.d/ 目录 二. ulim ...
随机推荐
- app后端设计(11)-- 系统架构(2014.12.05更新)
个人认为,在小型的创业团队中,特别是以应用产品为主,在架构后台的时候,需要集中精力解决自身业务上的问题,不是花时间解决第三方已经解决的问题,简单点来说,就是能用第三方服务就使用第三方的服务.基于这个原 ...
- Linux运行firefox出错
虚拟机自带的firefox版本太旧了,于是在官网上下载了最新的安装包,运行后提示: $ firefox XPCOMGlueLoad error for file /home/parallels/fir ...
- rename_windows.go
{ if err != nil { return err } return syscall.EINVAL } r ...
- [翻译 EF Core in Action 2.3] 理解EF Core数据库查询
Entity Framework Core in Action Entityframework Core in action是 Jon P smith 所著的关于Entityframework Cor ...
- 一行代码实现数组去重(ES6)
ES6中新增了Set数据结构,类似于数组,但是 它的成员都是唯一的 ,其构造函数可以接受一个数组作为参数,如: let array = [1, 1, 1, 1, 2, 3, 4, 4, 5, 3]; ...
- CART决策树和随机森林
CART 分裂规则 将现有节点的数据分裂成两个子集,计算每个子集的gini index 子集的Gini index: \(gini_{child}=\sum_{i=1}^K p_{ti} \sum_{ ...
- Python之父重回决策层
在Guido van Rossum(吉多·范罗苏姆)卸任BDFL(“终身仁慈独裁者”)一职半年多之后,Python社区迎来了新的治理新方案:指导委员会模式,而经过投票Guido van Rossum也 ...
- python爬虫踩坑教程
我们的目标是爬取下面这个个网址上的2010~2018年的数据 http://stockdata.stock.hexun.com/zrbg/Plate.aspx?date=2015-12-31 获取我们 ...
- Asp.NetCore轻松学-部署到 Linux 进行托管
前言 上一篇文章介绍了如何将开发好的 Asp.Net Core 应用程序部署到 IIS,且学习了进程内托管和进程外托管的区别:接下来就要说说应用 Asp.Net Core 的特性(跨平台),将 .Ne ...
- 如何手写JDK锁
手写JDK锁 需要三个步骤: 手写一个类MyLock,实现Lock接口 重写lock()方法 重写unlock()方法 代码: public class MyLock implements Lock ...