/ourls-resty

takashiki/Ourls 的 OpenResty 实现

Primary LanguageLua

Ourls-Resty

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

待增加的特性:

  • Cache 支持

安装方法:

  • 安装 openresty 预编译包手动编译教程
  • 安装 gcc、make、libidn、libidn-devel (yum gcc make install libidn-devel)
  • 将本工程解压到 openresty 目录,执行 install.sh (bash install.sh)
  • 修改 lualib/ourl/config.lua 中的数据库配置、hashids 参数、可信代理的 cidr
  • 恢复 urls.sql 至 mysql 或 mariadb 数据库
  • 进入 nginx/conf 目录,根据自己的实际情况修改 (合并配置,修改 server_name …)
  • 启动 openresty (service openresty start)

使用到的其他项目