httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Taylor <mtt...@gmail.com>
Subject mod_lua LuaHookAccessChecker not working
Date Sat, 19 Mar 2016 02:17:18 GMT
Hi,

I'm trying to use LuaHookAccessChecker but with the config below I am able
to access everything under "/", including example.lua

==== httpd.conf:

LuaHookAccessChecker /usr/local/apache/htdocs/access.lua access_check

<Files "*.lua">
    SetHandler lua-script
</Files>

==== /usr/local/apache/htdocs/access.lua:

function access_checker(r)
    r:err('access_checker')
    return 403 -- 403 is the 'Forbidden' status code
end

==== /usr/local/apache/htdocs/example.lua

function handle(r)
    r.content_type = "text/plain"
    r:puts("Hello Lua World!\n")
    return apache2.OK
end

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message