2007-05-23 15:56:58 -04:00
|
|
|
<?xml version="1.0"?>
|
2015-01-05 10:45:58 -05:00
|
|
|
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
|
2006-02-15 19:08:26 -05:00
|
|
|
|
|
|
|
<!-- =============================================================== -->
|
|
|
|
<!-- Configure the Jetty Server -->
|
2007-05-23 15:56:58 -04:00
|
|
|
<!-- -->
|
|
|
|
<!-- Documentation of this file format can be found at: -->
|
2012-03-07 15:49:28 -05:00
|
|
|
<!-- http://wiki.eclipse.org/Jetty/Reference/jetty.xml_syntax -->
|
2007-05-23 15:56:58 -04:00
|
|
|
<!-- -->
|
2006-02-15 19:08:26 -05:00
|
|
|
<!-- =============================================================== -->
|
2007-05-23 15:56:58 -04:00
|
|
|
|
|
|
|
|
2012-03-07 15:49:28 -05:00
|
|
|
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
2008-07-22 00:42:13 -04:00
|
|
|
|
2015-04-22 07:35:31 -04:00
|
|
|
<!-- =========================================================== -->
|
|
|
|
<!-- Configure the Server Thread Pool. -->
|
|
|
|
<!-- The server holds a common thread pool which is used by -->
|
|
|
|
<!-- default as the executor used by all connectors and servlet -->
|
|
|
|
<!-- dispatches. -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- Configuring a fixed thread pool is vital to controlling the -->
|
|
|
|
<!-- maximal memory footprint of the server and is a key tuning -->
|
|
|
|
<!-- parameter for tuning. In an application that rarely blocks -->
|
|
|
|
<!-- then maximal threads may be close to the number of 5*CPUs. -->
|
|
|
|
<!-- In an application that frequently blocks, then maximal -->
|
|
|
|
<!-- threads should be set as high as possible given the memory -->
|
|
|
|
<!-- available. -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- Consult the javadoc of o.e.j.util.thread.QueuedThreadPool -->
|
|
|
|
<!-- for all configuration that may be set here. -->
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<!-- uncomment to change type of threadpool
|
|
|
|
<Arg name="threadpool"><New id="threadpool" class="org.eclipse.jetty.util.thread.QueuedThreadPool"/></Arg>
|
|
|
|
-->
|
|
|
|
<Get name="ThreadPool">
|
|
|
|
<Set name="minThreads" type="int"><Property name="solr.jetty.threads.min" default="10"/></Set>
|
|
|
|
<Set name="maxThreads" type="int"><Property name="solr.jetty.threads.max" default="10000"/></Set>
|
2016-04-01 12:21:59 -04:00
|
|
|
<Set name="idleTimeout" type="int"><Property name="solr.jetty.threads.idle.timeout" default="120000"/></Set>
|
2015-04-23 10:17:35 -04:00
|
|
|
<Set name="stopTimeout" type="int"><Property name="solr.jetty.threads.stop.timeout" default="60000"/></Set>
|
2015-04-22 07:35:31 -04:00
|
|
|
<Set name="detailedDump">false</Set>
|
|
|
|
</Get>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<!-- Http Configuration. -->
|
|
|
|
<!-- This is a common configuration instance used by all -->
|
|
|
|
<!-- connectors that can carry HTTP semantics (HTTP, HTTPS, SPDY)-->
|
|
|
|
<!-- It configures the non wire protocol aspects of the HTTP -->
|
|
|
|
<!-- semantic. -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- This configuration is only defined here and is used by -->
|
|
|
|
<!-- reference from the jetty-http.xml, jetty-https.xml and -->
|
|
|
|
<!-- jetty-spdy.xml configuration files which instantiate the -->
|
|
|
|
<!-- connectors. -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- Consult the javadoc of o.e.j.server.HttpConfiguration -->
|
|
|
|
<!-- for all configuration that may be set here. -->
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
|
|
|
|
<Set name="secureScheme">https</Set>
|
|
|
|
<Set name="securePort"><Property name="solr.jetty.secure.port" default="8443" /></Set>
|
|
|
|
<Set name="outputBufferSize"><Property name="solr.jetty.output.buffer.size" default="32768" /></Set>
|
|
|
|
<Set name="outputAggregationSize"><Property name="solr.jetty.output.aggregation.size" default="8192" /></Set>
|
|
|
|
<Set name="requestHeaderSize"><Property name="solr.jetty.request.header.size" default="8192" /></Set>
|
|
|
|
<Set name="responseHeaderSize"><Property name="solr.jetty.response.header.size" default="8192" /></Set>
|
2015-04-23 10:17:35 -04:00
|
|
|
<Set name="sendServerVersion"><Property name="solr.jetty.send.server.version" default="false" /></Set>
|
2015-04-22 07:35:31 -04:00
|
|
|
<Set name="sendDateHeader"><Property name="solr.jetty.send.date.header" default="false" /></Set>
|
|
|
|
<Set name="headerCacheSize"><Property name="solr.jetty.header.cache.size" default="512" /></Set>
|
|
|
|
<Set name="delayDispatchUntilContent"><Property name="solr.jetty.delayDispatchUntilContent" default="false"/></Set>
|
|
|
|
<!-- Uncomment to enable handling of X-Forwarded- style headers
|
|
|
|
<Call name="addCustomizer">
|
|
|
|
<Arg><New class="org.eclipse.jetty.server.ForwardedRequestCustomizer"/></Arg>
|
|
|
|
</Call>
|
|
|
|
-->
|
|
|
|
</New>
|
|
|
|
|
2007-05-23 15:56:58 -04:00
|
|
|
<!-- =========================================================== -->
|
2015-03-26 16:51:23 -04:00
|
|
|
<!-- RewriteHandle to redirect root to Solr -->
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<New id="RewriteHandler" class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
|
|
|
|
<Set name="rewriteRequestURI">true</Set>
|
|
|
|
<Set name="rewritePathInfo">false</Set>
|
|
|
|
<Set name="originalPathAttribute">requestedPath</Set>
|
|
|
|
|
|
|
|
<Call name="addRule">
|
|
|
|
<Arg>
|
|
|
|
<New class="org.eclipse.jetty.rewrite.handler.RedirectRegexRule">
|
|
|
|
<Set name="regex">^/$</Set>
|
|
|
|
<Set name="replacement">/solr/</Set>
|
|
|
|
</New>
|
|
|
|
</Arg>
|
|
|
|
</Call>
|
|
|
|
</New>
|
|
|
|
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<!-- Set handler Collection Structure -->
|
2007-05-23 15:56:58 -04:00
|
|
|
<!-- =========================================================== -->
|
|
|
|
<Set name="handler">
|
2012-03-07 15:49:28 -05:00
|
|
|
<New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
|
2007-05-23 15:56:58 -04:00
|
|
|
<Set name="handlers">
|
2012-03-07 15:49:28 -05:00
|
|
|
<Array type="org.eclipse.jetty.server.Handler">
|
2015-03-26 16:51:23 -04:00
|
|
|
<Item>
|
|
|
|
<Ref id="RewriteHandler"/>
|
|
|
|
</Item>
|
2007-05-23 15:56:58 -04:00
|
|
|
<Item>
|
2012-03-07 15:49:28 -05:00
|
|
|
<New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
|
2007-05-23 15:56:58 -04:00
|
|
|
</Item>
|
|
|
|
<Item>
|
2012-03-07 15:49:28 -05:00
|
|
|
<New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
|
2007-05-23 15:56:58 -04:00
|
|
|
</Item>
|
|
|
|
<Item>
|
2012-03-07 15:49:28 -05:00
|
|
|
<New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler"/>
|
2007-05-23 15:56:58 -04:00
|
|
|
</Item>
|
|
|
|
</Array>
|
|
|
|
</Set>
|
|
|
|
</New>
|
|
|
|
</Set>
|
|
|
|
|
2012-07-12 07:42:01 -04:00
|
|
|
<!-- =========================================================== -->
|
|
|
|
<!-- Configure Request Log -->
|
|
|
|
<!-- =========================================================== -->
|
2015-01-05 10:45:58 -05:00
|
|
|
<!--
|
2012-07-12 07:42:01 -04:00
|
|
|
<Ref id="Handlers">
|
|
|
|
<Call name="addHandler">
|
|
|
|
<Arg>
|
|
|
|
<New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler">
|
|
|
|
<Set name="requestLog">
|
|
|
|
<New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog">
|
|
|
|
<Set name="filename">
|
2012-12-31 18:49:57 -05:00
|
|
|
logs/request.yyyy_mm_dd.log
|
2012-07-12 07:42:01 -04:00
|
|
|
</Set>
|
2012-12-31 15:49:17 -05:00
|
|
|
<Set name="filenameDateFormat">yyyy_MM_dd</Set>
|
2012-07-12 07:42:01 -04:00
|
|
|
<Set name="retainDays">90</Set>
|
|
|
|
<Set name="append">true</Set>
|
|
|
|
<Set name="extended">false</Set>
|
|
|
|
<Set name="logCookies">false</Set>
|
|
|
|
<Set name="LogTimeZone">UTC</Set>
|
|
|
|
</New>
|
|
|
|
</Set>
|
|
|
|
</New>
|
|
|
|
</Arg>
|
|
|
|
</Call>
|
|
|
|
</Ref>
|
|
|
|
-->
|
2006-02-15 19:08:26 -05:00
|
|
|
|
2007-05-23 15:56:58 -04:00
|
|
|
<!-- =========================================================== -->
|
2012-03-07 15:49:28 -05:00
|
|
|
<!-- extra options -->
|
2007-05-23 15:56:58 -04:00
|
|
|
<!-- =========================================================== -->
|
2012-03-07 15:49:28 -05:00
|
|
|
<Set name="stopAtShutdown">true</Set>
|
|
|
|
<Set name="dumpAfterStart">false</Set>
|
|
|
|
<Set name="dumpBeforeStop">false</Set>
|
|
|
|
|
|
|
|
<Call name="addBean">
|
2007-05-23 15:56:58 -04:00
|
|
|
<Arg>
|
2012-03-07 15:49:28 -05:00
|
|
|
<New id="DeploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager">
|
|
|
|
<Set name="contexts">
|
2015-01-05 10:45:58 -05:00
|
|
|
<Ref refid="Contexts" />
|
2012-03-07 15:49:28 -05:00
|
|
|
</Set>
|
|
|
|
<Call name="setContextAttribute">
|
|
|
|
<Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
|
|
|
|
<Arg>.*/servlet-api-[^/]*\.jar$</Arg>
|
|
|
|
</Call>
|
2015-01-05 10:45:58 -05:00
|
|
|
|
|
|
|
<Call name="addAppProvider">
|
|
|
|
<Arg>
|
|
|
|
<New class="org.eclipse.jetty.deploy.providers.WebAppProvider">
|
2015-04-22 07:35:31 -04:00
|
|
|
<Set name="monitoredDirName"><Property name="jetty.base" default="."/>/contexts</Set>
|
2015-01-05 10:45:58 -05:00
|
|
|
<Set name="scanInterval">0</Set>
|
|
|
|
</New>
|
|
|
|
</Arg>
|
|
|
|
</Call>
|
2012-03-07 15:49:28 -05:00
|
|
|
|
|
|
|
<!-- Add a customize step to the deployment lifecycle -->
|
|
|
|
<!-- uncomment and replace DebugBinding with your extended AppLifeCycle.Binding class
|
|
|
|
<Call name="insertLifeCycleNode">
|
|
|
|
<Arg>deployed</Arg>
|
|
|
|
<Arg>starting</Arg>
|
|
|
|
<Arg>customise</Arg>
|
|
|
|
</Call>
|
|
|
|
<Call name="addLifeCycleBinding">
|
|
|
|
<Arg>
|
|
|
|
<New class="org.eclipse.jetty.deploy.bindings.DebugBinding">
|
|
|
|
<Arg>customise</Arg>
|
|
|
|
</New>
|
|
|
|
</Arg>
|
|
|
|
</Call>
|
|
|
|
-->
|
|
|
|
|
2007-05-23 15:56:58 -04:00
|
|
|
</New>
|
|
|
|
</Arg>
|
|
|
|
</Call>
|
2012-03-07 15:49:28 -05:00
|
|
|
|
2007-05-23 15:56:58 -04:00
|
|
|
</Configure>
|