Lua > OpenResty HelloWorld

Lua > OpenResty HelloWorld

参考 https://www.bilibili.com/video/BV12i4y1L7As/

bash 复制代码
mkdir hello
cd hello
mkdir conf logs
vim conf/nginx.conf
conf 复制代码
worker_processes 1;

events {
    worker_connections 1024;
}

http {
    server {
        listen 8888 reuseport;
        
        location / {
            default_type text/plain;
            content_by_lua_block { ngx.say("Hello World") }
        }
    }
}
bash 复制代码
tree

.

├── conf

│ └── nginx.conf

└── logs

bash 复制代码
nginx -p ./ -t
nginx -p ./
ps aux | grep nginx
curl 'http://127.0.0.1:8888'

Hello World

相关推荐
翰林小院5 天前
【云原生监控】 Grafana/Prometheus/Promtail/Loki/Tempo
openresty
白驹过隙不负青春6 天前
OpenResty 1.29.2.5 部署 + Nginx平滑升级运维文档
nginx·openresty
Cry丶6 天前
一次 FTP 上传引发 504 Gateway Timeout 的排查复盘
java·nginx·ftp·openresty·被动模式·504 gateway·生产问题排查
吴声子夜歌7 天前
Redis 3.x——事务与Lua
redis·lua
豆瓣鸡9 天前
Redis Lua 脚本——把多条命令打包成一个原子操作
java·redis·lua
橙色阳光五月天11 天前
MATLAB函数如何打包成独立EXE
开发语言·matlab·lua
吴懿不在12 天前
apisix~OpenResty各阶段的介绍
openresty
耀耀_很无聊14 天前
12_Redis Lua 脚本踩坑:为什么 tonumber(ARGV[x]) 会得到 nil?
java·redis·lua
章老师说15 天前
NGINX官方谈Lua风险:这其实是两条网关技术路线之争
运维·nginx·负载均衡·lua·openresty
会周易的程序员16 天前
使用 LuaBridge 封装 C++ 日志库 microLog 为 Lua 模块
c++·物联网·junit·lua·日志·iot·aiot