Tomcat常用配置参数

官方提供的常用配置参数

# EMBEDDED SERVER CONFIGURATION (ServerProperties)

  1. server.address= # Network address to which the server should bind to.
  2. server.compression.enabled=false # If response compression is enabled.
  3. server.compression.excluded-user-agents= # List of user-agents to exclude from compression.
  4. server.compression.mime-types= # Comma-separated list of MIME types that should be compressed. For instance `text/html,text/css,application/json`
  5. server.compression.min-response-size= # Minimum response size that is required for compression to be performed. For instance 2048
  6. server.connection-timeout= # Time in milliseconds that connectors will wait for another HTTP request before closing the connection. When not set, the connector's container-specific default will be used. Use a value of -1 to indicate no (i.e. infinite) timeout.
  7. server.display-name=application # Display name of the application.
  8. server.max-http-header-size=0 # Maximum size in bytes of the HTTP message header.
  9. server.error.include-exception=false # Include the "exception" attribute.
  10. server.error.include-stacktrace=never # When to include a "stacktrace" attribute.
  11. server.error.path=/error # Path of the error controller.
  12. server.error.whitelabel.enabled=true # Enable the default error page displayed in browsers in case of a server error.
  13. server.jetty.acceptors= # Number of acceptor threads to use.
  14. server.jetty.accesslog.append=false # Append to log.
  15. server.jetty.accesslog.date-format=dd/MMM/yyyy:HH:mm:ss Z # Timestamp format of the request log.
  16. server.jetty.accesslog.enabled=false # Enable access log.
  17. server.jetty.accesslog.extended-format=false # Enable extended NCSA format.
  18. server.jetty.accesslog.file-date-format= # Date format to place in log file name.
  19. server.jetty.accesslog.filename= # Log filename. If not specified, logs will be redirected to "System.err".
  20. server.jetty.accesslog.locale= # Locale of the request log.
  21. server.jetty.accesslog.log-cookies=false # Enable logging of the request cookies.
  22. server.jetty.accesslog.log-latency=false # Enable logging of request processing time.
  23. server.jetty.accesslog.log-server=false # Enable logging of the request hostname.
  24. server.jetty.accesslog.retention-period=31 # Number of days before rotated log files are deleted.
  25. server.jetty.accesslog.time-zone=GMT # Timezone of the request log.
  26. server.jetty.max-http-post-size=0 # Maximum size in bytes of the HTTP post or put content.
  27. server.jetty.selectors= # Number of selector threads to use.
  28. server.port=8080 # Server HTTP port.
  29. server.server-header= # Value to use for the Server response header (no header is sent if empty)
  30. server.use-forward-headers= # If X-Forwarded-* headers should be applied to the HttpRequest.
  31. server.servlet.context-parameters.*= # Servlet context init parameters
  32. server.servlet.context-path= # Context path of the application.
  33. server.servlet.jsp.class-name=org.apache.jasper.servlet.JspServlet # The class name of the JSP servlet.
  34. server.servlet.jsp.init-parameters.*= # Init parameters used to configure the JSP servlet
  35. server.servlet.jsp.registered=true # Whether or not the JSP servlet is registered
  36. server.servlet.path=/ # Path of the main dispatcher servlet.
  37. server.session.cookie.comment= # Comment for the session cookie.
  38. server.session.cookie.domain= # Domain for the session cookie.
  39. server.session.cookie.http-only= # "HttpOnly" flag for the session cookie.
  40. server.session.cookie.max-age= # Maximum age of the session cookie in seconds.
  41. server.session.cookie.name= # Session cookie name.
  42. server.session.cookie.path= # Path of the session cookie.
  43. server.session.cookie.secure= # "Secure" flag for the session cookie.
  44. server.session.persistent=false # Persist session data between restarts.
  45. server.session.servlet.filter-order=-2147483598 # Session repository filter order.
  46. server.session.servlet.filter-dispatcher-types=ASYNC, ERROR, REQUEST # Session repository filter dispatcher types.
  47. server.session.store-dir= # Directory used to store session data.
  48. server.session.timeout= # Session timeout in seconds.
  49. server.session.tracking-modes= # Session tracking modes (one or more of the following: "cookie", "url", "ssl").
  50. server.ssl.ciphers= # Supported SSL ciphers.
  51. server.ssl.client-auth= # Whether client authentication is wanted ("want") or needed ("need"). Requires a trust store.
  52. server.ssl.enabled= # Enable SSL support.
  53. server.ssl.enabled-protocols= # Enabled SSL protocols.
  54. server.ssl.key-alias= # Alias that identifies the key in the key store.
  55. server.ssl.key-password= # Password used to access the key in the key store.
  56. server.ssl.key-store= # Path to the key store that holds the SSL certificate (typically a jks file).
  57. server.ssl.key-store-password= # Password used to access the key store.
  58. server.ssl.key-store-provider= # Provider for the key store.
  59. server.ssl.key-store-type= # Type of the key store.
  60. server.ssl.protocol=TLS # SSL protocol to use.
  61. server.ssl.trust-store= # Trust store that holds SSL certificates.
  62. server.ssl.trust-store-password= # Password used to access the trust store.
  63. server.ssl.trust-store-provider= # Provider for the trust store.
  64. server.ssl.trust-store-type= # Type of the trust store.
  65. server.tomcat.accept-count= # Maximum queue length for incoming connection requests when all possible request processing threads are in use.
  66. server.tomcat.accesslog.buffered=true # Buffer output such that it is only flushed periodically.
  67. server.tomcat.accesslog.directory=logs # Directory in which log files are created. Can be relative to the tomcat base dir or absolute.
  68. server.tomcat.accesslog.enabled=false # Enable access log.
  69. server.tomcat.accesslog.file-date-format=.yyyy-MM-dd # Date format to place in log file name.
  70. server.tomcat.accesslog.pattern=common # Format pattern for access logs.
  71. server.tomcat.accesslog.prefix=access_log # Log file name prefix.
  72. server.tomcat.accesslog.rename-on-rotate=false # Defer inclusion of the date stamp in the file name until rotate time.
  73. server.tomcat.accesslog.request-attributes-enabled=false # Set request attributes for IP address, Hostname, protocol and port used for the request.
  74. server.tomcat.accesslog.rotate=true # Enable access log rotation.
  75. server.tomcat.accesslog.suffix=.log # Log file name suffix.
  76. server.tomcat.additional-tld-skip-patterns= # Comma-separated list of additional patterns that match jars to ignore for TLD scanning.
  77. server.tomcat.background-processor-delay=30 # Delay in seconds between the invocation of backgroundProcess methods.
  78. server.tomcat.basedir= # Tomcat base directory. If not specified a temporary directory will be used.
  79. server.tomcat.internal-proxies=10\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}|\\
  80.         192\\.168\\.\\d{1,3}\\.\\d{1,3}|\\
  81.         169\\.254\\.\\d{1,3}\\.\\d{1,3}|\\
  82.         127\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}|\\
  83.         172\\.1[6-9]{1}\\.\\d{1,3}\\.\\d{1,3}|\\
  84.         172\\.2[0-9]{1}\\.\\d{1,3}\\.\\d{1,3}|\\
  85.         172\\.3[0-1]{1}\\.\\d{1,3}\\.\\d{1,3} # regular expression matching trusted IP addresses.
  86. server.tomcat.max-connections= # Maximum number of connections that the server will accept and process at any given time.
  87. server.tomcat.max-http-header-size=0 # Maximum size in bytes of the HTTP message header.
  88. server.tomcat.max-http-post-size=0 # Maximum size in bytes of the HTTP post content.
  89. server.tomcat.max-threads=0 # Maximum amount of worker threads.
  90. server.tomcat.min-spare-threads=0 # Minimum amount of worker threads.
  91. server.tomcat.port-header=X-Forwarded-Port # Name of the HTTP header used to override the original port value.
  92. server.tomcat.protocol-header= # Header that holds the incoming protocol, usually named "X-Forwarded-Proto".
  93. server.tomcat.protocol-header-https-value=https # Value of the protocol header that indicates that the incoming request uses SSL.
  94. server.tomcat.redirect-context-root= # Whether requests to the context root should be redirected by appending a / to the path.
  95. server.tomcat.remote-ip-header= # Name of the http header from which the remote ip is extracted. For instance `X-FORWARDED-FOR`
  96. server.tomcat.uri-encoding=UTF-8 # Character encoding to use to decode the URI.
  97. server.undertow.accesslog.dir= # Undertow access log directory.
  98. server.undertow.accesslog.enabled=false # Enable access log.
  99. server.undertow.accesslog.pattern=common # Format pattern for access logs.
  100. server.undertow.accesslog.prefix=access_log. # Log file name prefix.
  101. server.undertow.accesslog.rotate=true # Enable access log rotation.
  102. server.undertow.accesslog.suffix=log # Log file name suffix.
  103. server.undertow.buffer-size= # Size of each buffer in bytes.
  104. server.undertow.direct-buffers= # Allocate buffers outside the Java heap.
  105. server.undertow.io-threads= # Number of I/O threads to create for the worker.
  106. server.undertow.eager-filter-init=true # Whether servlet filters should be initialized on startup.
  107. server.undertow.max-http-post-size=0 # Maximum size in bytes of the HTTP post content.
  108. server.undertow.worker-threads= # Number of worker threads.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值