Skip to content

qless-web: Port of Qless' web interface to nginx-module-lua environment


If you haven't set up RPM repository subscription, sign up. Then you can proceed with the following steps.

CentOS/RHEL 7 or Amazon Linux 2

yum -y install
yum -y install lua-resty-qless-web

CentOS/RHEL 8+, Fedora Linux, Amazon Linux 2023

yum -y install
yum -y install lua5.1-resty-qless-web

To use this Lua library with NGINX, ensure that nginx-module-lua is installed.

This document describes lua-resty-qless-web v0.5 released on Sep 20 2016.


Port of Moz's qless web interface to the Openresty environment.



syntax: ok, err = Qless_web:new(opts)

opts is a table of options * client must be an instance of lua-resty-qless * uri_prefix defaults to /, sets the value prepended to all URIs


syntax: ok, err = qless_web:run()

Performs routing based on current uri. Requires a sub-location /__static configure to serve static assets


``` init_by_lua ' -- Require here to compile templates local Qless_Web = require("resty.qless-web") ';

location /web {

default_type text/html;
location /web/__static {
    rewrite ^/web/__static(.*) $1 break;
    root /path/to/lua-resty-qless-web/static/;

content_by_lua '
    -- Connect Qless client
    local resty_qless = require "resty.qless"
    local qless, err =
            redis = { host = "", port = 6379 }
        { database = 1 }
    if not qless then
        return ngx.say(" ", err)

    -- Create and run qless web
    local Qless_Web = require("resty.qless-web")
    local web = Qless_Web:new({ client = qless, uri_prefix = "/web" })




You may find additional configuration tips and documentation for this module in the GitHub repository for nginx-module-qless-web.