1 | <?xml version="1.0"?> |
---|
2 | <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> |
---|
3 | |
---|
4 | <!-- =============================================================== --> |
---|
5 | <!-- Configure the Jetty Server --> |
---|
6 | <!-- --> |
---|
7 | <!-- Documentation of this file format can be found at: --> |
---|
8 | <!-- http://docs.codehaus.org/display/JETTY/jetty.xml --> |
---|
9 | <!-- --> |
---|
10 | <!-- =============================================================== --> |
---|
11 | |
---|
12 | |
---|
13 | <Configure id="Server" class="org.mortbay.jetty.Server"> |
---|
14 | |
---|
15 | <!-- Increase the maximum POST size to 1 MB to be able to handle large shard requests --> |
---|
16 | <Call class="java.lang.System" name="setProperty"> |
---|
17 | <Arg>org.mortbay.jetty.Request.maxFormContentSize</Arg> |
---|
18 | <Arg>1000000</Arg> |
---|
19 | </Call> |
---|
20 | |
---|
21 | <!-- =========================================================== --> |
---|
22 | <!-- Server Thread Pool --> |
---|
23 | <!-- =========================================================== --> |
---|
24 | <Set name="ThreadPool"> |
---|
25 | <!-- Default bounded blocking threadpool |
---|
26 | --> |
---|
27 | <New class="org.mortbay.thread.BoundedThreadPool"> |
---|
28 | <Set name="minThreads">10</Set> |
---|
29 | <Set name="lowThreads">50</Set> |
---|
30 | <Set name="maxThreads">10000</Set> |
---|
31 | </New> |
---|
32 | |
---|
33 | <!-- Optional Java 5 bounded threadpool with job queue |
---|
34 | <New class="org.mortbay.thread.concurrent.ThreadPool"> |
---|
35 | <Arg type="int">0</Arg> |
---|
36 | <Set name="corePoolSize">10</Set> |
---|
37 | <Set name="maximumPoolSize">250</Set> |
---|
38 | </New> |
---|
39 | --> |
---|
40 | </Set> |
---|
41 | |
---|
42 | |
---|
43 | |
---|
44 | <!-- =========================================================== --> |
---|
45 | <!-- Set connectors --> |
---|
46 | <!-- =========================================================== --> |
---|
47 | <!-- One of each type! --> |
---|
48 | <!-- =========================================================== --> |
---|
49 | |
---|
50 | <!-- Use this connector for many frequently idle connections |
---|
51 | and for threadless continuations. |
---|
52 | <Call name="addConnector"> |
---|
53 | <Arg> |
---|
54 | <New class="org.mortbay.jetty.nio.SelectChannelConnector"> |
---|
55 | <Set name="port"><SystemProperty name="jetty.port" default="8983"/></Set> |
---|
56 | <Set name="maxIdleTime">30000</Set> |
---|
57 | <Set name="Acceptors">2</Set> |
---|
58 | <Set name="confidentialPort">8443</Set> |
---|
59 | </New> |
---|
60 | </Arg> |
---|
61 | </Call> |
---|
62 | --> |
---|
63 | |
---|
64 | <!-- Use this connector if NIO is not available. --> |
---|
65 | <!-- This connector is currently being used for Solr because the |
---|
66 | nio.SelectChannelConnector showed poor performance under WindowsXP |
---|
67 | from a single client with non-persistent connections (35s vs ~3min) |
---|
68 | to complete 10,000 requests) |
---|
69 | --> |
---|
70 | <Call name="addConnector"> |
---|
71 | <Arg> |
---|
72 | <New class="org.mortbay.jetty.bio.SocketConnector"> |
---|
73 | <Set name="host"><SystemProperty name="jetty.host" default="localhost"/></Set> |
---|
74 | <Set name="port"><SystemProperty name="jetty.port" default="8983"/></Set> |
---|
75 | <Set name="maxIdleTime">50000</Set> |
---|
76 | <Set name="lowResourceMaxIdleTime">1500</Set> |
---|
77 | </New> |
---|
78 | </Arg> |
---|
79 | </Call> |
---|
80 | |
---|
81 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
---|
82 | <!-- To add a HTTPS SSL listener --> |
---|
83 | <!-- see jetty-ssl.xml to add an ssl connector. use --> |
---|
84 | <!-- java -jar start.jar etc/jetty.xml etc/jetty-ssl.xml --> |
---|
85 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
---|
86 | |
---|
87 | <!-- =========================================================== --> |
---|
88 | <!-- Set up global session ID manager --> |
---|
89 | <!-- =========================================================== --> |
---|
90 | <!-- |
---|
91 | <Set name="sessionIdManager"> |
---|
92 | <New class="org.mortbay.jetty.servlet.HashSessionIdManager"> |
---|
93 | <Set name="workerName">node1</Set> |
---|
94 | </New> |
---|
95 | </Set> |
---|
96 | --> |
---|
97 | |
---|
98 | <!-- =========================================================== --> |
---|
99 | <!-- Set handler Collection Structure --> |
---|
100 | <!-- =========================================================== --> |
---|
101 | <Set name="handler"> |
---|
102 | <New id="Handlers" class="org.mortbay.jetty.handler.HandlerCollection"> |
---|
103 | <Set name="handlers"> |
---|
104 | <Array type="org.mortbay.jetty.Handler"> |
---|
105 | <Item> |
---|
106 | <New id="Contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection"/> |
---|
107 | </Item> |
---|
108 | <Item> |
---|
109 | <New id="DefaultHandler" class="org.mortbay.jetty.handler.DefaultHandler"/> |
---|
110 | </Item> |
---|
111 | <Item> |
---|
112 | <New id="RequestLog" class="org.mortbay.jetty.handler.RequestLogHandler"/> |
---|
113 | </Item> |
---|
114 | </Array> |
---|
115 | </Set> |
---|
116 | </New> |
---|
117 | </Set> |
---|
118 | |
---|
119 | <!-- =========================================================== --> |
---|
120 | <!-- Configure the context deployer --> |
---|
121 | <!-- A context deployer will deploy contexts described in --> |
---|
122 | <!-- configuration files discovered in a directory. --> |
---|
123 | <!-- The configuration directory can be scanned for hot --> |
---|
124 | <!-- deployments at the configured scanInterval. --> |
---|
125 | <!-- --> |
---|
126 | <!-- This deployer is configured to deploy contexts configured --> |
---|
127 | <!-- in the $JETTY_HOME/contexts directory --> |
---|
128 | <!-- --> |
---|
129 | <!-- =========================================================== --> |
---|
130 | <Call name="addLifeCycle"> |
---|
131 | <Arg> |
---|
132 | <New class="org.mortbay.jetty.deployer.ContextDeployer"> |
---|
133 | <Set name="contexts"><Ref id="Contexts"/></Set> |
---|
134 | <Set name="configurationDir"><SystemProperty name="jetty.home" default="."/>/contexts</Set> |
---|
135 | <Set name="scanInterval">1</Set> |
---|
136 | </New> |
---|
137 | </Arg> |
---|
138 | </Call> |
---|
139 | |
---|
140 | <!-- =========================================================== --> |
---|
141 | <!-- Configure the webapp deployer. --> |
---|
142 | <!-- A webapp deployer will deploy standard webapps discovered --> |
---|
143 | <!-- in a directory at startup, without the need for additional --> |
---|
144 | <!-- configuration files. It does not support hot deploy or --> |
---|
145 | <!-- non standard contexts (see ContextDeployer above). --> |
---|
146 | <!-- --> |
---|
147 | <!-- This deployer is configured to deploy webapps from the --> |
---|
148 | <!-- $JETTY_HOME/webapps directory --> |
---|
149 | <!-- --> |
---|
150 | <!-- Normally only one type of deployer need be used. --> |
---|
151 | <!-- --> |
---|
152 | <!-- =========================================================== --> |
---|
153 | <Call name="addLifeCycle"> |
---|
154 | <Arg> |
---|
155 | <New class="org.mortbay.jetty.deployer.WebAppDeployer"> |
---|
156 | <Set name="contexts"><Ref id="Contexts"/></Set> |
---|
157 | <Set name="webAppDir"><SystemProperty name="jetty.home" default="."/>/webapps</Set> |
---|
158 | <Set name="parentLoaderPriority">false</Set> |
---|
159 | <Set name="extract">true</Set> |
---|
160 | <Set name="allowDuplicates">false</Set> |
---|
161 | <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set> |
---|
162 | </New> |
---|
163 | </Arg> |
---|
164 | </Call> |
---|
165 | |
---|
166 | <!-- =========================================================== --> |
---|
167 | <!-- Configure Authentication Realms --> |
---|
168 | <!-- Realms may be configured for the entire server here, or --> |
---|
169 | <!-- they can be configured for a specific web app in a context --> |
---|
170 | <!-- configuration (see $(jetty.home)/contexts/test.xml for an --> |
---|
171 | <!-- example). --> |
---|
172 | <!-- =========================================================== --> |
---|
173 | <Set name="UserRealms"> |
---|
174 | <Array type="org.mortbay.jetty.security.UserRealm"> |
---|
175 | <!-- |
---|
176 | <Item> |
---|
177 | <New class="org.mortbay.jetty.security.HashUserRealm"> |
---|
178 | <Set name="name">Test Realm</Set> |
---|
179 | <Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set> |
---|
180 | </New> |
---|
181 | </Item> |
---|
182 | --> |
---|
183 | </Array> |
---|
184 | </Set> |
---|
185 | |
---|
186 | <!-- =========================================================== --> |
---|
187 | <!-- Configure Request Log --> |
---|
188 | <!-- Request logs may be configured for the entire server here, --> |
---|
189 | <!-- or they can be configured for a specific web app in a --> |
---|
190 | <!-- contexts configuration (see $(jetty.home)/contexts/test.xml --> |
---|
191 | <!-- for an example). --> |
---|
192 | <!-- =========================================================== --> |
---|
193 | <Ref id="RequestLog"> |
---|
194 | <Set name="requestLog"> |
---|
195 | <New id="RequestLogImpl" class="org.mortbay.jetty.NCSARequestLog"> |
---|
196 | <Arg><SystemProperty name="jetty.logs" default="./logs"/>/yyyy_mm_dd.request.log</Arg> |
---|
197 | <Set name="retainDays">90</Set> |
---|
198 | <Set name="append">true</Set> |
---|
199 | <Set name="extended">false</Set> |
---|
200 | <Set name="LogTimeZone">GMT</Set> |
---|
201 | </New> |
---|
202 | </Set> |
---|
203 | </Ref> |
---|
204 | |
---|
205 | <!-- =========================================================== --> |
---|
206 | <!-- extra options --> |
---|
207 | <!-- =========================================================== --> |
---|
208 | <Set name="stopAtShutdown">true</Set> |
---|
209 | <!-- ensure/prevent Server: header being sent to browsers --> |
---|
210 | <Set name="sendServerVersion">true</Set> |
---|
211 | |
---|
212 | </Configure> |
---|
213 | |
---|