-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.json
More file actions
52 lines (52 loc) · 1.38 KB
/
config.json
File metadata and controls
52 lines (52 loc) · 1.38 KB
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
{
//this file config the server
//change server by change this file
//set the bound port
"port":5200,
//default file when ask /
"default file":"index.html",
//if fork model,use "MULTIPLEXING" or "FORK" or"THREAD" or "REACTOR"
"model":"REACTOR",
//if long connect
"long connect":true,
//if run in background
"background":false,
//if use guard
"guard":false,
//if open the log
"logger":true,
//log path
"log path":"./access.log",
//auto find the file
"auto":true,
//message print to stdout or not
"message print":true,
//forward proxy,only be useful if model is fork or thread
"forward proxy":false,
//301 redirect,the arr must is a objext and have path and redirect,use as this
// "redirect":[
// {"path":"/root","redirect":"./template"},
// {"path":"/temp","redirect":"./tem"}
// ],
"redirect":[],
//remove path array
//"delete path":["./template"],
"delete path":[],
//replace the path,the arr must is a objext and have path and replace
// "replace":[
// {"path":"/root","replace":"./template"},
// {"path":"/temp","replace":"./tem"}
// ],
"replace":[],
//set agent array
// "reverse proxy":[
// {"model":"RANDOM","path":"/try*","host":["127.0.0.1:5201","127.0.0.1:5202"],"weight":[1,3]}
// ],
"ssl config":{
"reverse proxy":[],
//https certificate path
"cert path":"./ssl/cacert.pem",
"cert password":"123456",
"key path":"./ssl/privkey.pem"
}
}