Skip to content

bigplum/nginx-luap-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Example

####nginx.conf

luap {
    lua_file conf/test.lua;
}

####test.lua

local i = 0
local f = io.open("/tmp/luap", "w")

function sleep(n)
    os.execute("sleep "..tonumber(n))
end

--ngx.signal("stop")

sleep(10)
r1,r2,r3,r4,r5,r6 = ngx.status()

f:write(r1)
f:write(r2)
f:write(r3)
f:write(r4)
f:write(r5)
f:write(r6)
io.close(f)

About

attach a new nginx process to run lua script

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages