Server.json
Every time you start a server, the settings used to start it are saved in a server.json file in the web root. Any parameters that aren't supplied to the start command are read from this file (if it exists) and used as defaults. Here are the possible properties for a server.json file:
/server.json
1
{
2
"name": "",
3
"openBrowser": true,
4
"openBrowserURL" : "http://localhost/admin/login",
5
"startTimeout": 240,
6
"stopsocket": 50123,
7
"debug": false,
8
"trace": false,
9
"console": false,
10
"profile": "prod",
11
"dockEnable": true,
12
"trayEnable": true,
13
"trayicon": "/path/to/trayicon.png",
14
"env" : {
15
"ANYTHING_HERE" : "you want",
16
"THESE_ARE_ADDED" : "As environment variables to the server"
17
}
18
"trayOptions": [
19
{
20
"label": "Foo",
21
"action": "openbrowser",
22
"url": "http://${runwar.host}:${runwar.port}/foobar.cfm",
23
"disabled": false,
24
"image": "/path/to/image.png"
25
}
26
],
27
"jvm": {
28
"heapSize": 512,
29
"minHeapSize": 256,
30
"args": "",
31
"javaHome" : "/path/to/java/home",
32
"javaVersion" : "openjdk11"
33
},
34
"web": {
35
"host": "127.0.0.1",
36
"webroot": "src/cfml",
37
"directoryBrowsing": true,
38
"accessLogEnable": true,
39
"maxRequests":30,
40
"gzipEnable": true,
41
"gzipPredicate": "regex( '(.*).css' ) and request-larger-than( 500 )",
42
"aliases": {
43
"/foo": "../bar",
44
"/js": "C:/static/shared/javascript"
45
},
46
"errorPages": {
47
"404": "/path/to/404.html",
48
"500": "/path/to/500.html",
49
"default": "/path/to/default.html"
50
},
51
"welcomeFiles": "index.cfm,main.cfm,go.cfm",
52
"HTTP": {
53
"enable": true,
54
"port": 8080
55
},
56
"SSL": {
57
"enable": false,
58
"port": 443,
59
"certFile": "",
60
"keyFile": "",
61
"keyPass": ""
62
},
63
"AJP": {
64
"enable": false,
65
"port": 8009
66
},
67
"rewrites": {
68
"enable": true,
69
"logEnable": true,
70
"config": "/path/to/config.xml",
71
"statusPath": "/rewriteStatus",
72
"configReloadSeconds": 60
73
},
74
"basicAuth": {
75
"enable": true,
76
"users": {
77
"userName1": "password1",
78
"userName2": "password2"
79
}
80
},
81
"rules": [
82
"path-suffix(/box.json) -> set-error(404)",
83
"path-prefix(.env) -> set-error(404)",
84
"path-prefix(/admin/) -> ip-access-control(192.168.0.* allow)",
85
"path(/sitemap.xml) -> rewrite(/sitemap.cfm)",
86
"disallowed-methods(trace)"
87
],
88
89
//3 ways to specify rulesFile
90
"rulesFile": "../secure-rules.json",
91
// Or...
92
"rulesFile": [
93
"../security.json",
94
"../rewrites.json",
95
"../app-headers.json"
96
],
97
// Or...
98
"rulesFile":"../rules/*.json",
99
100
"blockCFAdmin": false,
101
"blockSensitivePaths": true,
102
"blockFlashRemoting": true
103
},
104
"app": {
105
"logDir": "",
106
"libDirs": "",
107
"webConfigDir": "",
108
"serverConfigDir": "",
109
"webXML": "",
110
"WARPath": "",
111
"cfengine": "[email protected]",
112
"restMappings": "/rest/*,/api/*",
113
"serverHomeDirectory": "",
114
"sessionCookieSecure": true,
115
"sessionCookieHTTPOnly": true,
116
"webXMLOverride" : "path/to/web.xml",
117
"webXMLOverrideForce" : false
118
},
119
"runwar": {
120
"jarPath": "/path/to/runwar.jar",
121
"args": "",
122
"XNIOOptions": {
123
"WORKER_NAME": "MyWorker"
124
},
125
"UndertowOptions": {
126
"ALLOW_UNESCAPED_CHARACTERS_IN_URL": true
127
}
128
}
129
}
Copied!
Last modified 1mo ago
Copy link