Home
Softono

Ourls Resty

Open source Lua
45
Stars
12
Forks
0
Issues
5
Watchers
9 years
Last Commit

 About Ourls Resty

takashiki/Ourls 的 OpenResty 实现

Platforms

Web Self-hosted

Languages

Lua

Links

Need Help Installing Ourls Resty?

We provide expert installation service for this software. Our team will install, configure, and secure Ourls Resty on your server. plans start at just $30.

Ourls Resty

View on GitHub

Ourls-Resty

Ourls 是由 takashiki 实现的一个基于发号和 hashid 的短网址服务。 受这个项目的启发,将此项目移植到 OpenResty

移植了原项目的功能和特性,并加入了内存缓存支持。

使用方法

环境

安装

  • 使用 opm 包管理安装本库: opm install xiaooloong/ourls-resty
  • 安装 lua 库依赖: luarocks install net-url && luarocks install router
  • 参考 hashids.lua 的说明安装 hashids

配置

  • 进入工程目录 /usr/local/openresty/site/lualib/ourl
  • 复制 config.sample.luaconfig.lua
  • 修改 config.lua 中的数据库配置、hashids 参数、可信代理服务器的 cidr
  • 恢复 urls.sqlmysqlmariadb 数据库
  • 进入 /usr/local/openresty/nginx/conf 目录
  • 根据自己的实际情况,配置静态文件,合并配置

完成

  • 启动 openresty (service openresty start)

使用到的其他项目