index.rst 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412
  1. .. _application_properties:
  2. Application Properties
  3. ----------------------
  4. While many configuration and setup options are available through the Web Administration application :menuselection:`Settings > Global` page, more fundamental (and security minded) changes to how the application operates are made using "Application Properties" defined by:
  5. * Java System Properties
  6. * Web Application context parameters
  7. * System Environmental Variable
  8. As part of the operating environment GeoServer application properties, unlike settings, cannot be changed at runtime.
  9. GeoServer Property Reference
  10. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  11. .. list-table::
  12. :width: 100%
  13. :widths: 70 10 10 10
  14. * - Application Property
  15. - System
  16. Property
  17. - Context
  18. Param
  19. - Env
  20. Variable
  21. * - GEOSERVER_DATA_DIR
  22. :doc:`/datadirectory/setting`
  23. - x
  24. - x
  25. - x
  26. * - GEOSERVER_MODULE_SYSTEM_ENVIRONMENT_STATUS_ENABLED
  27. :ref:`module_status_security_environment_vars`
  28. -
  29. -
  30. - x
  31. * - GEOSERVER_MODULE_SYSTEM_PROPERTY_STATUS_ENABLED
  32. :ref:`module_status_security_environment_vars`
  33. -
  34. -
  35. - x
  36. * - GEOWEBCACHE_CACHE_DIR
  37. :doc:`/geowebcache/config`
  38. - x
  39. - x
  40. - x
  41. * - GEOSERVER_NODE_OPTS
  42. :doc:`/production/identify`
  43. - x
  44. - x
  45. - x
  46. * - serviceStrategy
  47. :doc:`/production/config`, default PARTIAL-BUFFER2
  48. - x
  49. - x
  50. - x
  51. * - GEOSERVER_CONSOLE_DISABLED
  52. :doc:`/production/config`
  53. - x
  54. -
  55. -
  56. * - GWC_DISKQUOTA_DISABLED
  57. - x
  58. - x
  59. - x
  60. * - geoserver.login.autocomplete
  61. :doc:`/production/config`, default on.
  62. - x
  63. -
  64. - x
  65. * - CONFIGURATION_TRYLOCK_TIMEOUT
  66. Delay for REST API and Web Administration configuration changes (default 30000 MS)
  67. - x
  68. - x
  69. - x
  70. * - COMPARISON_TOLERANCE
  71. Referencing tolerance when matching PRJ to EPSG code (default 0.00000001)
  72. - x
  73. - x
  74. - x
  75. * - GEOSERVER_CSRF_DISABLED
  76. :doc:`/security/webadmin/csrf`
  77. - x
  78. - x
  79. - x
  80. * - GEOSERVER_CSRF_WHITELIST
  81. :doc:`/security/webadmin/csrf`
  82. - x
  83. - x
  84. - x
  85. * - org.geoserver.catalog.loadingThreads
  86. Number of threads used to load catalogue (Default 4).
  87. - x
  88. - x
  89. - x
  90. * - CAPABILITIES_CACHE_CONTROL_ENABLED
  91. Use false to disable, defaults to true.
  92. - x
  93. - x
  94. - x
  95. * - GEOSERVER_FILEBROWSER_HIDEFS
  96. When set to true only GEOSERVER_DATA_DIR available to browse.
  97. - x
  98. - x
  99. - x
  100. * - GEOSERVER_XSTREAM_WHITELIST
  101. Used to restrict catalogue persistence.
  102. - x
  103. - x
  104. - x
  105. * - geoserver.xframe.shouldSetPolicy
  106. :doc:`/production/config`, default true.
  107. - x
  108. - x
  109. - x
  110. * - geoserver.xframe.policy
  111. :doc:`/production/config`, default SAMEORIGIN
  112. - x
  113. - x
  114. - x
  115. * - ows10.exception.xml.responsetype
  116. :doc:`/production/config`
  117. - x
  118. -
  119. -
  120. * - ows11.exception.xml.responsetype
  121. :doc:`/production/config`
  122. - x
  123. -
  124. -
  125. * - ENABLE_MAP_WRAPPING
  126. Default if setting unavailable (true)
  127. - x
  128. - x
  129. - x
  130. * - ENABLE_ADVANCED_PROJECTION
  131. Default if setting unavailable (true)
  132. - x
  133. - x
  134. - x
  135. * - OPTIMIZE_LINE_WIDTH
  136. :doc:`/services/wms/global`, default true (can be set false.)
  137. - x
  138. - x
  139. - x
  140. * - MAX_FILTER_RULES
  141. :doc:`/services/wms/global`, default 20
  142. - x
  143. - x
  144. - x
  145. * - USE_GLOBAL_RENDERING_POOL
  146. Default is true, can be set false
  147. - x
  148. - x
  149. - x
  150. * - org.geoserver.render.raster.direct.disable
  151. Used to bypass direct raster rendering
  152. - x
  153. -
  154. -
  155. * - wms.raster.disableGutter
  156. Disable gutter used to request larger area when reprojecting raster content.
  157. - x
  158. -
  159. -
  160. * - wms.raster.enableRasterChainDebug
  161. Trouble shoot raster rendering
  162. - x
  163. -
  164. -
  165. * - GEOSERVER_GLOBAL_LAYER_GROUP_INHERIT
  166. Should workspaces include layer groups from the global workspace, default true.
  167. - x
  168. - x
  169. - x
  170. * - PROXY_BASE_URL
  171. Supply PROXY_BASE_URL, overriding settings.
  172. - x
  173. - x
  174. - x
  175. * - org.geoserver.service.disabled
  176. Default comma separated list of disabled services.
  177. - x
  178. - x
  179. - x
  180. * - GEOSERVER_DEFAULT_CACHE_PROVIDER
  181. Request custom cache implementation for catalog.
  182. - x
  183. - x
  184. - x
  185. * - org.geoserver.wfs.xml.WFSURIHandler.disabled
  186. Flag to disable internal handling of references to GeoServer.
  187. Force reflective references such as DescribeFeatureType to be handled as separate request.
  188. - x
  189. -
  190. -
  191. * - org.geoserver.wfs.xml.WFSURIHandler.additionalHostnames
  192. default localhost.
  193. - x
  194. -
  195. -
  196. * - force200
  197. Use true to force the http return code to always be 200.
  198. Required for WCS2.0, breaks OWS2 and WCS2 standards.
  199. - x
  200. -
  201. -
  202. * - GS_SHAPEFILE_CHARSET
  203. Supply default for shapefile datastore
  204. - x
  205. - x
  206. - x
  207. * - GEOSERVER_GEOJSON_LEGACY_CRS
  208. true to enable legacy GeoJSON output.
  209. - x
  210. - x
  211. - x
  212. * - ENABLE_JSONP
  213. :doc:`/services/wms/global`
  214. - x
  215. - x
  216. - x
  217. * - XML_LOOKAHEAD
  218. Number of bytes read to determine XML POST request (default 8192).
  219. - x
  220. - x
  221. - x
  222. * - org.geoserver.wfs.getfeature.cachelimit
  223. :doc:`/production/config`, default 0 (disabled)
  224. - x
  225. -
  226. -
  227. * - org.geoserver.wfs.xml.entityExpansionLimit
  228. Default 100.
  229. - x
  230. - x
  231. - x
  232. * - org.geoserver.htmlTemplates.staticMemberAccess
  233. :doc:`/tutorials/GetFeatureInfo/html`
  234. - x
  235. - x
  236. - x
  237. * - ENABLE_OL3
  238. Default true.
  239. - x
  240. - x
  241. - x
  242. * - GEOSERVER_LOG_LOCATION
  243. :doc:`/configuration/logging`
  244. - x
  245. - x
  246. - x
  247. * - RELINQUISH_LOG4J_CONTROL
  248. :doc:`/configuration/logging`
  249. - x
  250. - x
  251. - x
  252. * - GT2_LOGGING_REDIRECTION
  253. :doc:`/configuration/logging`
  254. - x
  255. - x
  256. - x
  257. * - wicket.configuration
  258. Wicket RuntimeConfigurationType (DEPLOYMENT or DEVELOPMENT)
  259. - x
  260. - x
  261. - x
  262. Setting Application property
  263. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  264. Application properties are determined using the first value obtained from: Java System Properties, Web Application context parameters, or System Environmental Variable.
  265. Using ``GEOSERVER_DATA_DIR`` as an example:
  266. 1. Java System Properties: Supplied to the java virtual machine as part of your application server configuration.
  267. .. code-block:: bash
  268. -DGEOSERVER_DATA_DIR=/var/lib/geoserver_data
  269. * For Tomcat on Linux edit :file:`setenv.sh` to append additional java system properties:
  270. .. code-block:: bash
  271. # Append system properties
  272. CATALINA_OPTS="${CATALINA_OPTS} -DGEOSERVER_DATA_DIR=/var/lib/geoserver_data"
  273. * For Tomcat on Windows use :command:`Apache Tomcat Properties` application, navigating to the :guilabel:`Java` tab to edit :guilabel:`Java Options`:
  274. .. code-block:: text
  275. -DGEOSERVER_DATA_DIR=C:\ProgramData\GeoServer\data
  276. While not commonly used for GEOSERVER_DATA_DIR, this approach is a popular way to enable/disable optional GeoServer functionality.
  277. 2. Web Application context parameter:
  278. * Tomcat: Use your application server to configure the GeoServer web application via :file:`conf/Catalina/localhost/geoserver.xml` file:
  279. .. code-block:: xml
  280. <Context docBase="geoserver.war">
  281. <Parameter name="GEOSERVER_DATA_DIR"
  282. value="/var/opt/geoserver/data" override="false"/>
  283. </Context>
  284. .. note:: Tomcat management of application properties as using ``override="false"`` is not the most straight forward to understand. This setting prevents parameter defined in :file:`WEB-INF/web.xml` (from the :file:`geoserver.war` ) to override the provided file location.
  285. Other application servers provide a user interface to manage web application properties and are more intuitive.
  286. * Not recommended: Hand editing the `webapps/geoserver/WEB-INF/web.xml` file:
  287. .. code-block:: xml
  288. <context-param>
  289. <param-name>GEOSERVER_DATA_DIR</param-name>
  290. <param-value>/var/lib/geoserver_data</param-value>
  291. </context-param>
  292. .. note:: This file is part of the GeoServer application and will be replaced when updating the application.
  293. As a result this approach is error prone making updates more difficult and is not recommended.
  294. 3. System environmental variable:
  295. .. code-block:: bash
  296. export GEOSERVER_DATA_DIR=/var/lib/geoserver_data
  297. This approach can be useful for GEOSERVER_DATA_DIR when running GeoServer in a docker container, traditionally managed with environmental variables.
  298. Additional system properties
  299. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  300. Cascading WFS and WMS services where GeoServer acts as a client for another web service make use of the Apache Http Components HTTP client library.
  301. The HTTP client library respects the following java system properties::
  302. ssl.TrustManagerFactory.algorithm
  303. javax.net.ssl.trustStoreType
  304. javax.net.ssl.trustStore
  305. javax.net.ssl.trustStoreProvider
  306. javax.net.ssl.trustStorePassword
  307. ssl.KeyManagerFactory.algorithm
  308. javax.net.ssl.keyStoreType
  309. javax.net.ssl.keyStore
  310. javax.net.ssl.keyStoreProvider
  311. javax.net.ssl.keyStorePassword
  312. https.protocols
  313. https.cipherSuites
  314. http.proxyHost
  315. http.proxyPort
  316. https.proxyHost
  317. https.proxyPort
  318. http.nonProxyHosts
  319. http.keepAlive
  320. http.maxConnections
  321. http.agent
  322. Reference:
  323. * `HttpClientBuilder <https://hc.apache.org/httpcomponents-client-4.5.x/current/httpclient/apidocs/index.html?org/apache/http/impl/client/HttpClientBuilder.html>`__