nginx.conf 480 字节
Newer Older
1 2 3 4 5 6 7 8
worker_processes  1;
user root;
error_log logs/error.log;
events {
    worker_connections 1024;
}

http {
9
    lua_package_path '$prefix/lua/?.lua;$prefix/rest/?.lua;$prefix/rest/?/init.lua;;';
10
    lua_package_cpath  "$prefix/so/?.so;;"; 
11
    lua_code_cache on;
12 13 14 15 16 17 18 19 20 21
    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;
        }
    }
}