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

相关推荐
AI_567819 小时前
Postman接口测试提速技巧:批量请求+智能断言实践
测试工具·lua·postman
杨了个杨89823 天前
Tengine与OpenResty
openresty
曹天骄3 天前
OpenResty 源站安全隔离设计在边缘计算架构中的工程实践
安全·边缘计算·openresty
小王不爱笑1324 天前
Postman 使用教程
测试工具·lua·postman
TracyCoder1235 天前
Redis 进阶之路:探秘事务、Lua 与特殊数据结构
数据结构·redis·lua
星空露珠6 天前
速算24点所有题库公式
开发语言·数据库·算法·游戏·lua
星空露珠6 天前
速算24点检测生成核心lua
开发语言·数据库·算法·游戏·lua
想做后端的前端8 天前
Lua的热更新
开发语言·lua
快乐肚皮8 天前
OpenResty:Nginx的进化之路
nginx·junit·openresty
澄风9 天前
Redis ZSet+Lua脚本+SpringBoot实战:滑动窗口限流方案从原理到落地
spring boot·redis·lua