Commit 98266078 authored by 周尚's avatar 周尚

change base.lua path

parent 4ee26b73
...@@ -7,7 +7,7 @@ function _BASE.__LINE__ () return debug.getinfo(2,'l').currentline end ...@@ -7,7 +7,7 @@ function _BASE.__LINE__ () return debug.getinfo(2,'l').currentline end
function _BASE.log(self, fname, ...) function _BASE.log(self, fname, ...)
local fpath = string.format("/Users/zhoush/openresty/nginx/logs/%s_%s.log", tostring(fname), os.date("%Y%m%d")) local fpath = string.format("nginx/logs/%s_%s.log", tostring(fname), os.date("%Y%m%d"))
local f = io.open(fpath, "a+") local f = io.open(fpath, "a+")
local str = "" local str = ""
for i=1, select("#", ...) do for i=1, select("#", ...) do
...@@ -22,7 +22,7 @@ function _BASE.log(self, fname, ...) ...@@ -22,7 +22,7 @@ function _BASE.log(self, fname, ...)
end end
function _BASE.db_read(self, dbpath) function _BASE.db_read(self, dbpath)
local f = io.open("/Users/zhoush/openresty/nginx/conf/"..dbpath, "r") local f = io.open("nginx/conf/"..dbpath, "r")
local tmp = f:read("a*") local tmp = f:read("a*")
local db_st = json.decode(tmp) local db_st = json.decode(tmp)
f:close() f:close()
......
user zhoush; user root;
# user nobody; # user nobody;
worker_processes auto; worker_processes auto;
...@@ -31,7 +31,7 @@ http { ...@@ -31,7 +31,7 @@ http {
#keepalive_timeout 0; #keepalive_timeout 0;
keepalive_timeout 65; keepalive_timeout 65;
init_worker_by_lua_file "openresty/luabiz/settle/settle.lua"; init_worker_by_lua_file "/www/openresty/luabiz/settle/settle.lua";
#gzip on; #gzip on;
server { server {
...@@ -111,8 +111,8 @@ http { ...@@ -111,8 +111,8 @@ http {
location /test { location /test {
content_by_lua_block { content_by_lua_block {
package.path = package.path..";lubiz/?.lua;;" package.path = package.path..";openresty/luabiz/?.lua;;"
package.path = package.path..";lubiz/settle/?.lua;;" package.path = package.path..";openresty/luabiz/settle/?.lua;;"
tk_sdt = require ("tk_sdt") tk_sdt = require ("tk_sdt")
tk_sdt:run() tk_sdt:run()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment