-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbenchmark.nginx.conf
69 lines (57 loc) · 1.55 KB
/
benchmark.nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#### GLOBAL ####
user www www;
#pid logs/nginx.pid;
worker_processes auto;
worker_rlimit_nofile 65535;
#### EVENT ####
events {
use epoll;
worker_connections 65535;
}
#### HTTP ####
http {
#include mime.types;
default_type text/plain;
index index.php index.html;
error_log /data1/ms/log/nginx/error.log info;
log_format combined2 '$remote_addr - $remote_user [$time_local] $upstream_response_time $request_time '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
access_log /data1/ms/log/nginx/access.log combined2;
sendfile on;
send_timeout 30; #If the client does not receive anything within this time, the connection is closed.
keepalive_timeout 30; #idle seconds
server_tokens off;
client_body_timeout 10;
client_header_timeout 10;
lua_package_path '/data1/ms/front/docker/config/openresty/?.lua;;';
lua_shared_dict fuse_shard_dict 10m;
init_worker_by_lua_block {
local fuse = require "url_fuse"
fuse:setup(function(this)
this.LIFETIME = 10
this.FAILS_LIMIT = 10
this.REQUEST_TIMEOUT =5
this.FUSED_DURATION = 5
end)
}
server {
listen 80;
root /data1/ms/front/;
location ~ ^/.*(\.js|\.css|\.png|\.gif|\.jpg|favicon\.ico)$ {
log_not_found off;
access_log off;
}
location / {
access_by_lua_block {
local fuse = require "url_fuse"
fuse:run_access()
}
log_by_lua_block {
local fuse = require "url_fuse"
fuse:run_log()
}
return 200 'hello';
}
}
}