nginx.conf 469 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
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;
        }
    }
}