-
Notifications
You must be signed in to change notification settings - Fork 9
/
xitrum.conf
executable file
·181 lines (148 loc) · 6.03 KB
/
xitrum.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
xitrum {
# Comment out if you don't want to protect the whole site with basic authentication.
#basicAuth {
#realm = xitrum
#username = xitrum
#password = xitrum
#}
# Hostname or IP.
# Comment out to listen on all network interfaces.
#interface = localhost
# Comment out the one you don't want to start.
port {
http = 8000
https = 4430
# May use same port with HTTP server.
# flash_socket_policy.xml will be returned.
#flashSocketPolicy = 8430
}
# On Linux, you can use native epoll based transport that uses edge-triggered
# mode for maximal performance and low latency.
edgeTriggeredEpoll = false
# Not used if port.https above is disabled
https {
# If useOpenSSL is true (HTTPS will be faster), Apache Portable Runtime (APR)
# and OpenSSL must be in the library load path such as system library directories,
# $LD_LIBRARY_PATH, and %PATH%.
openSSL = false
certChainFile = config/ssl_example.crt
keyFile = config/ssl_example.key
}
# Comment out if you don't run Xitrum behind a reverse proxy, like Nginx.
# If you do, you should:
# - Configure the proxy to serve static files
# - Set response.autoGzip below to false and let the proxy do the response compressing
#reverseProxy {
# If you run Xitrum behind a proxy, for Xitrum to determine the origin's IP,
# the absolute URL etc., set IP of the proxies here. For security, only proxies
# with IPs set here are allowed. Remember to config the proxy to set the
# following headers properly (see your proxy documentation):
# X-Forwarded-Host
# X-Forwarded-For
# X-Forwarded-Proto, or X-Forwarded-Scheme, or X-Forwarded-Ssl
#ips = ["127.0.0.1"]
# Set baseUrl to "/my_site" if you want the URL to be http://<domain>/my_site/...
# Otherwise set it to empty string
#baseUrl = /my_site
#}
# Comment out to specify the system temporary directory.
tmpDir = ./tmp
# Comment out if you don't use template engine.
template {
"xitrum.view.Scalate" {
defaultType = jade # jade, mustache, scaml, or ssp
}
}
cache {
# Simple in-memory cache
"xitrum.local.LruCache" {
maxElems = 10000
}
# Commented out: Cache is automatically disabled in development mode,
# and enabled in production mode.
# enabled = true: Force cache to be enabled even in development mode.
# enabled = false: Force cache to be disabled even in production mode.
#enabled = true
}
session {
# Store sessions on client side.
#store = xitrum.scope.session.CookieSessionStore
# Simple in-memory server side session store.
store {
"xitrum.local.LruSessionStore" {
maxElems = 10000
}
}
# You can use xitrum-hazelcast if you want clustered server side session store:
# https://github.com/xitrum-framework/xitrum-hazelcast
# If you run multiple sites on the same domain, make sure that there's no
# cookie name conflict between sites.
cookieName = _session
# Seconds to live from last access.
# Comment out to delete when browser closes windows.
#cookieMaxAge = 3600
# Key to encrypt session cookie etc.
# If you deploy your application to several instances be sure to use the same key!
# Do not use the example below! Use your own!
secureKey = "ajconghoaofuxahoi92chunghiaujivietnamlasdoclapjfltudoil98hanhphucup8"
}
# Static files are put in "public" directory.
staticFile {
# This regex is to optimize static file serving speed by avoiding unnecessary
# file existence check. Ex:
# - "\\.(ico|txt)$": files should end with .txt or .ico extension
# - ".*": file existence will be checked for all requests (not recommended)
pathRegex = "\\.(ico|jpg|jpeg|gif|png|html|htm|txt|css|js|map)$"
# Small static files are cached in memory.
# Files bigger than maxSizeInKBOfCachedFiles will not be cached.
maxSizeInKBOfCachedFiles = 512
maxNumberOfCachedFiles = 1024
# true: ETag response header is set for static files.
# Before reusing the files, clients must send requests to server
# to revalidate if the files have been changed. Use this when you
# create HTML directly with static files.
# false: Response headers are set so that clients will cache static files
# for one year. Use this when you create HTML from templates and use
# publicUrl("path/to/static/file") in templates.
revalidate = false
}
request {
charset = UTF-8
# Initial line example: "GET / HTTP/1.1".
# Adjust this when you use very long URL, e.g. send a lot of data with GET method.
maxInitialLineLength = 4096
maxHeaderSize = 81920
# Increase if you want to allow bigger file upload.
# (Google App Engine's limit: 32 MB)
maxSizeInMB = 32
# Upload files bigger than maxSizeInKBOfUploadMem will be saved to tmpDir/upload
# instead of memory.
maxSizeInKBOfUploadMem = 16
# Sensitive parameters that should not be logged to access log.
filteredParams = ["password", "passwordConfirm"]
}
response {
# Set to true to tell Xitrum to gzip big textual response when
# request header Accept-Encoding contains "gzip":
# http://en.wikipedia.org/wiki/HTTP_compression
autoGzip = true
sockJsCookieNeeded = false
# Comment out if you don't use CORS and SockJS (SockJS needs CORS):
# https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS
#corsAllowOrigins = ["*"]
#corsAllowOrigins = ["http://example.com"]
}
# Version of your app's API, displayed at Swagger Doc (URL: /xitrum/swagger).
# Comment out if you want to disable Swagger Doc (for security reason etc.).
swaggerApiVersion = "1.0-SNAPSHOT"
# Comment out if you don't want metrics feature.
metrics {
# Key to access /xitrum/metrics/viewer?api_key=<this key>
# Do not use the example below! Use your own!
apiKey = "kgreankbeplawfr7934jv2nr0bsbas0"
# Collect JMX metrics.
jmx = true
# Collect Xitrum actions metrics.
actions = true
}
}