z-blog-openresty
January 23, 2022 · View on GitHub
依赖
- OpenResty:基于
Nginx的高性能Web服务器 - lua-resty-template:适用
Nginx和OpenResty的HTML模板渲染引擎 - pgmoon:
PostgreSQL的Lua驱动 - lua-resty-woothee:基于
Woothee的User-Agent解析器 - lua-resty-http:
OpenResty和ngx_lua中的HTTP客户端 - lua-resty-auto-ssl:自动注册和更新
Let's Encrypt的https证书(需编写Lua代码) - certbot:自动注册和更新
Let's Encrypt的https证书(安装成Linux服务后自动更新证书,无需编写代码)
安装依赖
luarocks install lua-resty-template 2.0-1
luarocks install pgmoon 1.12.0-1
luarocks install lua-resty-woothee 1.12.0-1
luarocks install lua-resty-http 0.15-0
luarocks install lua-resty-auto-ssl 0.13.1-1
LuaRocks安装可参考
初始化数据库
initdb
psql -d postgres -f pg_schema.sql