Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 182 lines (148 sloc) 6.04 KB
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|svg|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
}
}