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

相关推荐
杨了个杨89822 天前
Tengine与OpenResty
openresty
曹天骄2 天前
OpenResty 源站安全隔离设计在边缘计算架构中的工程实践
安全·边缘计算·openresty
小王不爱笑1323 天前
Postman 使用教程
测试工具·lua·postman
TracyCoder1234 天前
Redis 进阶之路:探秘事务、Lua 与特殊数据结构
数据结构·redis·lua
星空露珠4 天前
速算24点所有题库公式
开发语言·数据库·算法·游戏·lua
星空露珠5 天前
速算24点检测生成核心lua
开发语言·数据库·算法·游戏·lua
想做后端的前端7 天前
Lua的热更新
开发语言·lua
快乐肚皮7 天前
OpenResty:Nginx的进化之路
nginx·junit·openresty
澄风8 天前
Redis ZSet+Lua脚本+SpringBoot实战:滑动窗口限流方案从原理到落地
spring boot·redis·lua
Geoking.8 天前
【Redis】Redis 中的 Pipeline 与 Lua 脚本:高性能与原子性的两种武器
redis·lua