File: wt_config.xml.in

package info (click to toggle)
witty 3.1.2-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 45,512 kB
  • ctags: 35,832
  • sloc: cpp: 69,469; ansic: 66,945; xml: 4,383; sh: 594; perl: 108; makefile: 106
file content (364 lines) | stat: -rw-r--r-- 13,284 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<!--
    Wt Configuration File.

    The Wt configuration file manages, for every Wt application, settings
    for session management, debugging, directory for runtime information
    such as session sockets, and some security settings.

    Settings may be specified globally, or for a single application path.

    The path should be as configured in the Wt build process, where it
    defaults to /etc/wt/wt_config.xml. It can be overridden in the environment
    variable WT_CONFIG_XML, or with the -c startup option of wthttpd.

    The values listed here are the default values, which are used when the
    declaration is missing or no configuration file is used.
  -->

<server>

    <!-- Default application settings

      The special location "*" always matches. See below for an example
      of settings specific to a single application.
      -->
    <application-settings location="*">

        <!-- Session management. -->
	<session-management>
            <!-- Every session runs within a dedicated process.

	       This mode guarantees kernel-level session privacy, but as every
	       session requires a seperate process, it is also an easy target
	       for DoS attacks if not shielded by access control.

               It is also a convenient mode during development, as it is easy
	       to enable disable debugging using valgrind, and it always starts
	       the latest deployed executable for a new session.
	   
	       Note: currently only supported using the FastCGI connector
              -->

	    <!--
	       <dedicated-process>
		 <max-num-sessions>100</max-num-sessions>
	       </dedicated-process>
	      -->

	    <!-- Multiple sessions within one process.

	       This mode spawns a number of processes, and sessions are
	       allocated randomly to one of these processes (you should not
	       use this for dynamic FCGI servers, but only in conjunction
	       with a fixed number of static FCGI servers.

	       This requires careful programming, as memory corruption in one
	       session will kill all of the sessions in the same process. You
	       should debug extensively using valgrind. Also, it is your
	       responsibility to keep session state not interfering and
	       seperated.

	       On the other hand, sessions are inexpensive, and this mode
	       suffers far less from DoS attacks than dedicated-process mode.
	       Use it for non-critical and well-debugged web applications.

	       Note: wthttpd always uses exactly one process
              -->
	    <shared-process>
	        <num-processes>1</num-processes>
	    </shared-process>

	    <!-- Session tracking strategy.

	       Possible values:
		 Auto: cookies is available, otherwise URL rewriting
		 URL:  only URL rewriting
	      -->
	    <tracking>URL</tracking>

	    <!-- How reload should be handled.

	       When reload should (or rather, may) spawn a new session, then
	       even in the case cookies are not used for session management,
	       the URL will not be cluttered with a sessionid.
	       However, WApplication::refresh() will never be called.
	      -->
	    <reload-is-new-session>true</reload-is-new-session>

	    <!-- Session timeout (seconds).

	       When a session remains inactive for this amount of time, it is
	       cleaned up.
	      -->
	    <timeout>600</timeout>

	    <!-- Server push timeout (seconds).

               When using server-initiated updates, the client uses
               long-polling requests. Proxies (including reverse
               proxies) are notorious for silently closing idle
               requests; the client therefore cancels the request
               periodically and issues a new one. This timeout sets
               the frequency.
	      -->
	    <server-push-timeout>50</server-push-timeout>
	</session-management>

	<!-- Settings that apply only to the FastCGI connector.

	   To configure the wthttpd connector, use command line options, or
	   configure default options in /etc/wt/wthttpd
	  -->
	<connector-fcgi>
	    <!-- Valgrind path

               If debugging is enabled and this path is not empty, then valgrind
	       will be started for every shared process, or for every session
	       which has ?debug appended to the command line.

	       The variable is slighly misnamed. Not only a path can be set,
	       but also options, like for example:

                 /usr/bin/valgrind - -leak-check=full
             -->
	    <valgrind-path></valgrind-path>

	    <!-- Run directory

               Path used by Wt to do session management.
	      -->
	    <run-directory>${RUNDIR}</run-directory>

	    <!-- Number of threads per process

               This configures the size of the thread pool. You may
               want to change this value if you would like to support
               reentrant event loops, where you block one event loop
               using WDialog::exec() or related static
               methods. Everytime you enter such an event loop, one
               thread is blocked, and therefore the total number of
               sessions that reliably can do this is limited to the
               number of thread you have (minus one to unblock).

	       For the built-in http connector, there is a similar
	       config option that is specified in the whttpd config
	       file or on the command line (-t).

               The default value is 1.
	      -->
	    <num-threads>1</num-threads>

	</connector-fcgi>

        <!-- Enable debug

	     When enabled,
	     - JavaScript errors are not caught to display an error message.
	  -->
	<debug>false</debug>

	<!-- Log file

	   When the log file is empty, or omitted, logging is done to
	   stderr. This may end up in the web server error log file
	   (e.g. for apache + fastcgi module), or on stderr (e.g. for
	   the built-in httpd).
         -->
	<log-file></log-file>

	<!-- Maximum HTTP request size (Kb) -->
	<max-request-size>128</max-request-size>

	<!-- Session id length (number of characters) -->
	<session-id-length>16</session-id-length>

	<!-- Send the XHTML mime type when appropriate

	   Wt renders XHTML1 (XML variant of HTML) that is backward-compatible
	   with HTML. Using XHTML, Wt is capable of supporting XHTML-only
	   features such as embedded SVG or MathML.

	   When enabled, JWt sets an XHTML mime-type
	   (application/xhtml+xml) when the browser reports support
	   for it. Most notably, Internet Explorer does not support
	   it.  Because XHTML and HTML are slightly different with
	   respect to default CSS rules, you may want to disable
	   sending the XHTML mime-type alltogether, at least if you
	   are not using SVG (used by the WPaintedWidget).  -->
	<send-xhtml-mime-type>false</send-xhtml-mime-type>

	<!-- Do strict serialization of events.

	   By default events are queued at the client-side, and
	   transmitted to the server so that at any time only one
	   request/response is pending. This scheme has a quality that
	   resembles TCP: on a low-latency link you allow the
	   transmission of many smaller requests, while on a high
	   latency link, events will be propagated less often, but in
	   batches.

	   In any case, this scheme does not drop events, no matter
	   how quickly they are generated.

	   In rare cases, the scheme may result in unwanted behaviour,
	   because the client-side is allowed to be slighly out of
	   sync at the time an event is recorded with the server-side
	   (and more so on high-latency links). The drastic
	   alternative is to discard events while a response is
	   pending, and can be configured by setting this option to
	   true.
	  -->
	<strict-event-serialization>false</strict-event-serialization>

	<!-- Redirect message shown for browsers without JavaScript support

	   By default, Wt will use an automatic redirect to start the
	   application when the browser does not support
	   JavaScript. However, browsers are not required to follow
	   the redirection, and in some situations (when using XHTML),
	   such automatic redirection is not supported.

	   This configures the text that is shown in the anchor which
	   the user may click to be redirected to a basic HTML version
	   of your application.
          -->
	<redirect-message>Load basic HTML</redirect-message>

	<!-- Whether we are sitting behind a reverse proxy 

	   When deployed behind a reverse proxy (such as Apache or Squid),
	   the server location is not read from the "Host" header,
	   but from the X-Forwarded-For header, if present.
	  -->
	<behind-reverse-proxy>false</behind-reverse-proxy>

	<!-- Whether inline CSS is allowed.

           Some Wt widgets will insert CSS rules in the the inline
           stylesheet when first used. This can be disabled using this
	   configuration option.

           Note: some widgets, such as WTreeView, dynamically
           manipulate rules in this stylesheet, and will no longer
           work properly when inline-css is disabled.
	  -->
	<inline-css>true</inline-css>

	<!-- Ajax user agent list

            Wt considers three types of sessions:
	    - AJAX sessions: use AJAX and JavaScript
	    - plain HTML sessions: use plain old server GETs and POSTs
	    - bots: have clean internal paths and no persistent sessions

            By default, Wt does a browser detection to distinguish between
	    the first two: if a browser supports JavaScript (and has it
	    enabled), and has an AJAX DOM API, then AJAX sessions are chosen,
	    otherwise plain HTML sessions.

            Here, you may indicate which user agents should or should
            not receive an AJAX session regardless of what they report as
	    capabilities.

            Possible values for 'mode' or "white-list" or "black-list". A
	    white-list will only treat the listed agents as supporting AJAX,
	    all other agents will be served plain HTML sessions. A black-list
	    will always server plain HTML sessions to listed agents and
	    otherwise rely on browser capability detection.

            Each <user-agent> is a regular expression.
	  -->
	<user-agents type="ajax" mode="black-list">
	  <!-- <user-agent>.*Crappy browser.*</user-agent> -->
	</user-agents>

	<!-- Bot user agent list

            Here, you can specify user agents that should be should be
            treated as bots.

            Each <user-agent> is a regular expression.
	  -->
	<user-agents type="bot">
	  <user-agent>.*Googlebot.*</user-agent>
	  <user-agent>.*msnbot.*</user-agent>
	  <user-agent>.*Slurp.*</user-agent>
	  <user-agent>.*Crawler.*</user-agent>
	  <user-agent>.*Bot.*</user-agent>
	  <user-agent>.*ia_archiver.*</user-agent>
	  <user-agent>.*Twiceler.*</user-agent>
	</user-agents>

	<!-- Whether the progressive bootstrap is used.

	     The default bootstrap method first senses whether there is AJAX
	     support, and only then creates the application.

	     The progressive bootstrap method first renders a plain HTML
	     version and later upgrades to an AJAX version.
	  -->
	<progressive-bootstrap>false</progressive-bootstrap>

	<!-- Runtime Properties
     
           These properties may be used to adapt applications to their
	   deployment environment. Typical use is for paths to resources
	   that may or may not be shared between several applications.
	  -->
	<properties>
            <!-- resourcesURL property

	       The URL at which the resources/ folder is deploeyd that
	       comes distributed with Wt and contains auxiliary files
	       used to primarily for styles and themes.

	       The default value is 'resources/'
              -->
	    <property name="resourcesURL">resources/</property>

	    <!-- extBaseURL property

               Used in conjunction with Ext:: widgets, and points to the
	       URL of Ext JavaScript and resource files (css, images).
	       See the documentation for the Ext namespace for details.

	       The default value is 'ext/'
              -->
	    <property name="extBaseURL">ext/</property>

	    <!-- favicon property

	       By default, a browser will try to fetch a /favicon.ico icon
	       from the root of your web server which is used as an icon
	       for your application. You can specify an alternative location
	       by setting this property, or for an individual application
	       entry point by passing a location to WServer::addEntryPoint().
	      -->
	    <!-- <property name="favicon">images/favicon.ico</property> -->

	    <!-- oldInternalPathAPI property

	       Since wt 2.99.3, the internal path API has been simplified.
	       The API functions are still the same, but the semantics have
	       changed. To keep using the old semantics (which are deprecated
	       but still implemented) you can set this property.
	      -->
	    <!-- <property name="oldInternalPathAPI">true</property> -->
	</properties>

    </application-settings>


    <!-- Override settings for specific applications.

       Location refers to physical filesystem location of the
       application. The application prints this location (which
       corresponds to argv[0]) to the log file on startup, and this
       should match exactly.
      -->
    <!--
    <application-settings
       location="/var/www/localhost/wt-examples/hello.wt">
    </application-settings>
    -->
</server>