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

相关推荐
IMPYLH10 小时前
Lua 的 Package 模块
java·开发语言·笔记·后端·junit·游戏引擎·lua
极客先躯2 天前
老版本Postman请求脚本编写指南:从Async/Await到回调函数的完整迁移方案
测试工具·lua·postman
oMcLin2 天前
如何在 Debian 11 上配置并调优 Nginx 与 Lua 脚本,提升高流量 API 网关的性能与安全性?
nginx·debian·lua
oMcLin3 天前
如何在 CentOS 7 上通过配置和调优 OpenResty,提升高并发 Web 应用的 API 请求处理能力?
前端·centos·openresty
悟能不能悟5 天前
怎么使用postman批量的给api做测试
测试工具·lua·postman
最贪吃的虎6 天前
Redis其实并不是线程安全的
java·开发语言·数据库·redis·后端·缓存·lua
_200_7 天前
Lua 流程控制
开发语言·junit·lua
Kang.Charles7 天前
Lua UI系统框架逻辑详解
ui·lua
oMcLin7 天前
如何在 Rocky Linux 8.6 上配置并调优 Nginx 与 Lua 脚本,提升 API 网关的性能与并发处理能力
linux·nginx·lua
姓蔡小朋友9 天前
LUA脚本
开发语言·junit·lua