worker_processes  1;
user root;
error_log logs/error.log;
events {
    worker_connections 1024;
}

http {
    lua_package_path '$prefix/lua/?.lua;$prefix/rest/?.lua;/blah/?.lua;;';
    lua_package_cpath  "$prefix/so/?.so;;"; 
    lua_code_cache off;
    server {
        listen    7000;
        server_name  restapi;
 	charset utf-8;
	lua_need_request_body on;
        location ~ ^/api/([-_a-zA-Z0-9/]+) {
            content_by_lua_file rest/$1.lua;
        }
    }
}
