source: other-projects/hathitrust/wcsa/extracted-features-solr/trunk/web-portal/etc/jetty.xml@ 31383

Last change on this file since 31383 was 31383, checked in by davidb, 7 years ago

Files for initial functioning search page

File size: 9.9 KB
Line 
1<?xml version="1.0"?>
2<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
3
4<!-- =============================================================== -->
5<!-- Configure the Jetty Server -->
6<!-- -->
7<!-- Documentation of this file format can be found at: -->
8<!-- http://wiki.eclipse.org/Jetty/Reference/jetty.xml_syntax -->
9<!-- -->
10<!-- =============================================================== -->
11
12
13<Configure id="Server" class="org.eclipse.jetty.server.Server">
14
15 <!-- =========================================================== -->
16 <!-- Configure the Server Thread Pool. -->
17 <!-- The server holds a common thread pool which is used by -->
18 <!-- default as the executor used by all connectors and servlet -->
19 <!-- dispatches. -->
20 <!-- -->
21 <!-- Configuring a fixed thread pool is vital to controlling the -->
22 <!-- maximal memory footprint of the server and is a key tuning -->
23 <!-- parameter for tuning. In an application that rarely blocks -->
24 <!-- then maximal threads may be close to the number of 5*CPUs. -->
25 <!-- In an application that frequently blocks, then maximal -->
26 <!-- threads should be set as high as possible given the memory -->
27 <!-- available. -->
28 <!-- -->
29 <!-- Consult the javadoc of o.e.j.util.thread.QueuedThreadPool -->
30 <!-- for all configuration that may be set here. -->
31 <!-- =========================================================== -->
32 <Arg name="threadpool">
33 <New id="threadpool" class="com.codahale.metrics.jetty9.InstrumentedQueuedThreadPool">
34 <Arg name="registry">
35 <Call id="solrJettyMetricRegistry" name="getOrCreate" class="com.codahale.metrics.SharedMetricRegistries">
36 <Arg>solr.jetty</Arg>
37 </Call>
38 </Arg>
39 </New>
40 </Arg>
41
42 <Get name="ThreadPool">
43 <Set name="minThreads" type="int"><Property name="solr.jetty.threads.min" default="10"/></Set>
44 <Set name="maxThreads" type="int"><Property name="solr.jetty.threads.max" default="10000"/></Set>
45 <Set name="idleTimeout" type="int"><Property name="solr.jetty.threads.idle.timeout" default="5000"/></Set>
46 <Set name="stopTimeout" type="int"><Property name="solr.jetty.threads.stop.timeout" default="60000"/></Set>
47 <Set name="detailedDump">false</Set>
48 </Get>
49
50
51 <!-- =========================================================== -->
52 <!-- Http Configuration. -->
53 <!-- This is a common configuration instance used by all -->
54 <!-- connectors that can carry HTTP semantics (HTTP, HTTPS, SPDY)-->
55 <!-- It configures the non wire protocol aspects of the HTTP -->
56 <!-- semantic. -->
57 <!-- -->
58 <!-- This configuration is only defined here and is used by -->
59 <!-- reference from the jetty-http.xml, jetty-https.xml and -->
60 <!-- jetty-spdy.xml configuration files which instantiate the -->
61 <!-- connectors. -->
62 <!-- -->
63 <!-- Consult the javadoc of o.e.j.server.HttpConfiguration -->
64 <!-- for all configuration that may be set here. -->
65 <!-- =========================================================== -->
66 <New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
67 <Set name="secureScheme">https</Set>
68 <Set name="securePort"><Property name="solr.jetty.secure.port" default="8443" /></Set>
69 <Set name="outputBufferSize"><Property name="solr.jetty.output.buffer.size" default="32768" /></Set>
70 <Set name="outputAggregationSize"><Property name="solr.jetty.output.aggregation.size" default="8192" /></Set>
71 <Set name="requestHeaderSize"><Property name="solr.jetty.request.header.size" default="8192" /></Set>
72 <Set name="responseHeaderSize"><Property name="solr.jetty.response.header.size" default="8192" /></Set>
73 <Set name="sendServerVersion"><Property name="solr.jetty.send.server.version" default="false" /></Set>
74 <Set name="sendDateHeader"><Property name="solr.jetty.send.date.header" default="false" /></Set>
75 <Set name="headerCacheSize"><Property name="solr.jetty.header.cache.size" default="512" /></Set>
76 <Set name="delayDispatchUntilContent"><Property name="solr.jetty.delayDispatchUntilContent" default="false"/></Set>
77 <!-- Uncomment to enable handling of X-Forwarded- style headers
78 <Call name="addCustomizer">
79 <Arg><New class="org.eclipse.jetty.server.ForwardedRequestCustomizer"/></Arg>
80 </Call>
81 -->
82 </New>
83
84 <!-- =========================================================== -->
85 <!-- RewriteHandle to redirect root to Solr -->
86 <!-- =========================================================== -->
87 <New id="RewriteHandler" class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
88 <Set name="rewriteRequestURI">true</Set>
89 <Set name="rewritePathInfo">false</Set>
90 <Set name="originalPathAttribute">requestedPath</Set>
91
92 <Call name="addRule">
93 <Arg>
94 <New class="org.eclipse.jetty.rewrite.handler.RedirectRegexRule">
95 <Set name="regex">^/$</Set>
96 <Set name="replacement">/solr/</Set>
97 </New>
98 </Arg>
99 </Call>
100 </New>
101
102 <!-- =========================================================== -->
103 <!-- Set handler Collection Structure -->
104 <!-- =========================================================== -->
105 <Set name="handler">
106 <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
107 <Set name="handlers">
108 <Array type="org.eclipse.jetty.server.Handler">
109 <Item>
110 <Ref id="RewriteHandler"/>
111 </Item>
112 <Item>
113 <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
114 </Item>
115 <Item>
116 <New id="InstrumentedHandler" class="com.codahale.metrics.jetty9.InstrumentedHandler">
117 <Arg><Ref refid="solrJettyMetricRegistry"/></Arg>
118 <Set name="handler">
119 <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
120 </Set>
121 </New>
122 </Item>
123 <Item>
124 <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler"/>
125 </Item>
126 </Array>
127 </Set>
128 </New>
129 </Set>
130
131 <!-- =========================================================== -->
132 <!-- Configure Request Log -->
133 <!-- =========================================================== -->
134 <!--
135 <Ref id="Handlers">
136 <Call name="addHandler">
137 <Arg>
138 <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler">
139 <Set name="requestLog">
140 <New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog">
141 <Set name="filename">
142 logs/request.yyyy_mm_dd.log
143 </Set>
144 <Set name="filenameDateFormat">yyyy_MM_dd</Set>
145 <Set name="retainDays">90</Set>
146 <Set name="append">true</Set>
147 <Set name="extended">false</Set>
148 <Set name="logCookies">false</Set>
149 <Set name="LogTimeZone">UTC</Set>
150 </New>
151 </Set>
152 </New>
153 </Arg>
154 </Call>
155 </Ref>
156 -->
157
158 <!-- =========================================================== -->
159 <!-- extra options -->
160 <!-- =========================================================== -->
161 <Set name="stopAtShutdown">true</Set>
162 <Set name="dumpAfterStart">false</Set>
163 <Set name="dumpBeforeStop">false</Set>
164
165 <Call name="addBean">
166 <Arg>
167 <New id="DeploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager">
168 <Set name="contexts">
169 <Ref refid="Contexts" />
170 </Set>
171 <Call name="setContextAttribute">
172 <Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
173 <Arg>.*/servlet-api-[^/]*\.jar$</Arg>
174 </Call>
175
176 <Call name="addAppProvider">
177 <Arg>
178 <New class="org.eclipse.jetty.deploy.providers.WebAppProvider">
179 <Set name="monitoredDirName"><Property name="jetty.base" default="."/>/contexts</Set>
180 <Set name="scanInterval">0</Set>
181 </New>
182 </Arg>
183 </Call>
184
185 <!-- Add a customize step to the deployment lifecycle -->
186 <!-- uncomment and replace DebugBinding with your extended AppLifeCycle.Binding class
187 <Call name="insertLifeCycleNode">
188 <Arg>deployed</Arg>
189 <Arg>starting</Arg>
190 <Arg>customise</Arg>
191 </Call>
192 <Call name="addLifeCycleBinding">
193 <Arg>
194 <New class="org.eclipse.jetty.deploy.bindings.DebugBinding">
195 <Arg>customise</Arg>
196 </New>
197 </Arg>
198 </Call>
199 -->
200
201 </New>
202 </Arg>
203 </Call>
204
205
206 <Call name="addBean">
207 <Arg>
208 <New class="org.eclipse.jetty.security.HashLoginService">
209 <Set name="name">HTRC-EF Realm</Set>
210 <Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set>
211 <Set name="refreshInterval">0</Set>
212 </New>
213 </Arg>
214 </Call>
215
216
217</Configure>
Note: See TracBrowser for help on using the repository browser.