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

相关推荐
chxii15 小时前
lua流程控制语句和table(表)数据结构
开发语言·junit·lua
chxii18 小时前
lua 基础语法(上)
开发语言·lua
xingpanvip2 天前
星盘接口开发文档:日运语料接口指南
android·开发语言·前端·css·php·lua
xingpanvip2 天前
星盘接口开发文档:星相日历接口指南
android·开发语言·前端·css·php·lua
咸鱼永不翻身3 天前
Lua脚本事件检查工具
unity·lua·工具
笑虾4 天前
cocos2d-x lua 加载 Cocos Studio 导出的 csb
游戏引擎·lua·cocos2d
xingpanvip4 天前
星盘接口开发文档:日返比接口指南
开发语言·lua
xingpanvip5 天前
星盘接口开发文档:天象盘接口指南
android·开发语言·python·php·lua
tianyuanwo5 天前
Rust RPM Spec 中的动态宏定义:原理、原因与低版本兼容方案
rust·lua·spec
tianyuanwo5 天前
rpm spec文件为什么有时调用lua脚本语言而不是shell
lua·spec