-
Notifications
You must be signed in to change notification settings - Fork 239
Expand file tree
/
Copy pathnginx_edge.conf
More file actions
44 lines (33 loc) · 800 Bytes
/
nginx_edge.conf
File metadata and controls
44 lines (33 loc) · 800 Bytes
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
# vi:syntax=nginx
events {
worker_connections 1024;
}
error_log stderr;
http {
resolver 127.0.0.11 ipv6=off;
include generic_conf/setup_logging.conf;
include generic_conf/lua_path_setup.conf;
include generic_conf/basic_vts_setup.conf;
include generic_conf/setup_cache.conf;
upstream backend {
server backend:8080;
server backend1:8080;
keepalive 10; # connection pool
}
server {
listen 8080;
location / {
set_by_lua_block $cache_key {
return ngx.var.uri
}
access_by_lua_block {
local edge = require "edge"
edge.simulate_load()
}
proxy_pass http://backend;
include generic_conf/define_cache.conf;
add_header X-Edge Server;
}
include generic_conf/basic_vts_location.conf;
}
}