File: configmacros.html

package info (click to toggle)
wn 2.0.5-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 2,208 kB
  • ctags: 1,499
  • sloc: ansic: 14,439; sh: 2,430; perl: 1,360; makefile: 291
file content (514 lines) | stat: -rw-r--r-- 16,609 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
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<html>
  <head>
    <title>Configuration Macros for WN</title>

    <link rev="made" href="mailto:john@math.nwu.edu">

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
    <meta http-equiv="last-modified" content="Tue, 22 Sep 1998 14:55:00 GMT">
    <meta http-equiv="keywords" content="WN installation, WN configuration">
  </head>

  <body bgcolor="#FFFFFF">
    <p>
      <a href="http://hopf.math.nwu.edu/"><img
        src="images/powered.jpg"
        border="0"
        width="190"
        height="41"
        align="right"
        alt="WN home page"
      ></a>
    </p>

    <strong>Version 2.0.3</strong>

    <br>

    <!-- pnuts --> <a href="appendixF.html">[Previous]</a> <a href="howindex.html">[Next]</a> <a href="manual.html">[Up]</a> <a href="manual.html">[Top]</a> <a href="dosearch.html">[Search]</a> <a href="docindex.html">[Index]</a>


    <br clear="right">

    <hr size="4">
    <!-- #start -->

    <h2 align="center">Configuration Macros for <em>WN</em></h2>
    <hr size="4">


    <p>
      This section summarizes some of the important UNIX <a
      href="http://linux-howto.com/man/man1/cpp.1.html"><code>cpp(1)</code></a>
      utility macros defined in the file <a
      href="config.h.dist">config.h.dist</a> that controls the configuration of
      <em>WN</em>.
    </p>


    <h3><a
    name="ACCESS_DENIED_URL"><code>#define&nbsp;ACCESS_DENIED_URL</code></a></h3>

    <p>
      Any request for a document in a directory which is denied because of an
      "<code><a href="appendixB.html#ddir.accessfile">Accessfile=</a></code>"
      restriction should be redirected to the given URL.  This can be
      overridden by with the "<code><a
      href="appendixB.html#ddir.access-denied-url">Access-denied-URL=</a></code>".
    </p>

    <p>
      The default is to comment out this macro.
    </p>


    <h3><a
    name="AUTH_DENIED_FILE"><code>#define&nbsp;AUTH_DENIED_FILE</code></a></h3>

    <p>
      This is the document returned when <a
      href="access.html#authenticate">password authentication</a> fails because
      of an incorrect password or username
    </p>

    <p>
      The default is <code>"/noauth.html"</code>.
    </p>


    <h3><a name="CGI_BIN"><code>#define&nbsp;CGI_BIN</code></a></h3>

    <p>
      Directory name to identify <a href="cgi.html">CGI</a> programs.
    </p>

    <p>
      The default is <code>"cgi-bin"</code>.
    </p>


    <h3><a name="CGI_EXT"><code>#define&nbsp;CGI_EXT</code></a></h3>

    <p>
      File extension to identify <a href="cgi.html">CGI</a> programs.
    </p>

    <p>
      The default is <code>".cgi"</code>.
    </p>


    <h3><a name="DEFAULT_PORT"><code>#define&nbsp;DEFAULT_PORT</code></a></h3>

    <p>
      Default port to run the stand-alone servers <code>wnsd</code> on.  This
      can be overridden at runtime by using the <a
      href="appendixA1.html#p_opt"><code>-p</code></a> command line option.
    </p>

    <p>
      The default is <code>(80)</code>.
    </p>


    <h3><a name="DEFAULT_URI"><code>#define&nbsp;DEFAULT_URI</code></a></h3>

    <p>
      This is the document returned in response to a request with only the
      hostname, (something like "<code>http://hostname.edu/</code>" with no
      file name at the end).  You would need to change it, for example, if you
      wanted to have the default server response be to run a <a
      href="cgi.html">CGI</a> program.
    </p>

    <p>
      The default is <code>"/index.hmtl"</code>.
    </p>


    <h3><a name="FORBID_CGI"><code>#define&nbsp;FORBID_CGI</code></a></h3>

    <p>
      Define this if you wish to forbid the use of the use of <a
      href="http://hoohoo.ncsa.uiuc.edu/cgi/">CGI/1.1</a> programs on your
      host.  This will enhance security but will, of course, decrease
      functionality.  See the chapter "<a href="cgi.html">Using CGI Programs on
      the <em>WN</em> Server</a>" in this guide.
    </p>

    <p>
      The default is to comment out this macro.
    </p>


    <h3><a name="GROUPID"><code>#define&nbsp;GROUPID</code></a></h3>

    <p>
      Same as for "<code><a href="#USERID">#define&nbsp;USERID</a></code>" but
      for the group id.
    </p>


    <h3><a
    name="INDEXFILE_NAME"><code>#define&nbsp;INDEXFILE_NAME</code></a></h3>

    <p>
      Default file name if the requested URL does not include a file name.
    </p>

    <p>
      The default is <code>"index.hmtl"</code>.
    </p>


    <h3><a name="LEAST_UID"><code>#define&nbsp;LEAST_UID</code></a></h3>

    <p>
      Minimum allowable uid for users with personal home directories.
    </p>

    <p>
      The default is <code>(100)</code>.
    </p>


    <h3><a
    name="MIME_TYPE_FILE"><code>#define&nbsp;MIME_TYPE_FILE</code></a></h3>

    <p>
      The full path name of the file containing information permitting <a
      href="index_desc.html#wndex"><code>wndex</code></a> to translate the MIME
      "<code>Content-type</code>" from the suffix of a file name.  If this file
      is not present, running <code>wndex</code> with the <a
      href="appendixA2.html#v_opt"><code>-v</code></a> option will issue a
      warning but use internal default values.  The file exists so that you can
      add to it if you wish to add new kinds of documents to your server.  The
      format of the file is explained in the file.  The default version of the
      file is in <code>/lib/mime.types</code>.  The internal defaults are the
      same as what is currently in this file.
    </p>

    <p>
      The default is <code>"/usr/local/lib/wn/mime.types"</code>.
    </p>


    <h3><a
    name="NO_DNS_HOSTNAMES"><code>#define&nbsp;NO_DNS_HOSTNAMES</code></a></h3>

    <p>
      Do not use hostnames in your log file, just IP addresses.  This will
      reduce the load on your server (but probably not speed up responses since
      the lookups usually take place after the transaction is complete).  Keep
      in mind that uncommenting this will mean that none of your <a
      href="cgi.html">CGI</a> programs will get the hostname and also that your
      <a href="access.html#ip">access files</a> cannot have hostnames in them,
      just IP addresses.
    </p>

    <p>
      The default is to comment out this macro.
    </p>


    <h3><a name="NO_SERVEALL"><code>#define&nbsp;NO_SERVEALL</code></a></h3>

    <p>
      Define to disable the server's ability to serve documents not listed in
      an <code>index.cache</code> file.  See the chapter "<a
      href="index_desc.html">Creating Your <em>WN</em> Data Directory</a>" in
      this guide for more details.
    </p>

    <p>
      The default is to comment out this macro.
    </p>


    <h3><a
    name="NO_SUCH_FILE_URL"><code>#define&nbsp;NO_SUCH_FILE_URL</code></a></h3>

    <p>
      Specifies that any request in this directory for a non-existent file or a
      file not listed in the <a
      href="index_desc.html#index"><code>index</code></a> file of this
      directory should be redirected to the given URL.  Can be overridden with
      the "<code><a
      href="appendixB.html#ddir.no-such-file-url">No-Such-File-URL=</a></code>"
      directory directive in the <a
      href="index_desc.html#index"><code>index</code></a> file.
    </p>

    <p>
      The default is to comment out this macro.
    </p>


    <h3><a name="PUB_HTML"><code>#define&nbsp;PUB_HTML</code></a></h3>

    <p>
      Name of public directory for home directories.  See the section "<a
      href="tilde.html#home_directory_alternate">Alternate Hierarchies From a
      Table Lookup</a>" in this guide for more details.
    </p>

    <p>
      The default is <code>"/public_html"</code>.
    </p>


    <h3><a
    name="RFC931_TIMEOUT"><code>#define&nbsp;RFC931_TIMEOUT</code></a></h3>

    <p>
      Timeout in seconds for the server when attempting to do <a
      href="http://linux-howto.com/rfc/rfc0500-0999/rfc0931.txt">RFC 931</a>
      lookups on clients using the UNIX <a
      href="http://linux-howto.com/man/man8/identd.8.html"><code>identd(8)</code></a>
      system utility.  This may be good for additional logging information, but
      should not be trusted for authentication.  Comment out if no lookup is
      desired.
    </p>

    <p>
      Because of bugs in many PC TCP/IP stacks that may cause identification
      connections to time out instead of being refused (certain firewall
      configurations may cause the same problem) this defaults to off, and the
      timeout should be kept low.  Ten seconds is about as high as I recommend.
      Remember, this timeout will need to be fulfilled on <em>every</em>
      request from that client, so pages with lots of in-line images will
      become painful.
    </p>

    <p>
      The default is to comment out this macro.
    </p>


    <h3><a name="ROOT_DIR"><code>#define&nbsp;ROOT_DIR</code></a></h3>

    <p>
      Complete path of your root data directory.
    </p>

    <p>
      The default is <code>"/usr/local/wn"</code>.
    </p>


    <h3><a name="SWN_PID_FILE"><code>#define&nbsp;SWN_PID_FILE</code></a></h3>

    <p>
      Full path of the file in which you wish the stand-alone server
      <code>wnsd</code> to deposit its process id on startup.  Comment this out
      or set it to the empty string <code>""</code> if you want the pid printed
      to the UNIX <a
      href="http://linux-howto.com/man/man3/stdio.3.html"><code>stdout(3)</code></a>
      stream on startup instead of being placed in a file.  This can be
      overridden at runtime by using the <a
      href="appendixA1.html#q_opt"><code>-q</code></a> command line option.
    </p>

    <p>
      The default is <code>"/usr/local/wnlogs/wn.pid"</code>.
    </p>


    <h3><a name="TILDE_TABLE"><code>#define&nbsp;TILDE_TABLE</code></a></h3>

    <p>
      If defined to the path of a file containing <code>name:directory</code>
      pairs then URLs starting with "<code><a
      href="#TILDE_USER_STRING">TILDE_USER_STRING</a>name/foo</code>" will be
      changed to <code>/foo</code> and the root directory will be the directory
      after the '<code>:</code>' in the table.  See the section "<a
      href="tilde.html#home_directory_alternate">Alternate Hierarchies From a
      Table Lookup</a>" in this guide for more details
    </p>

    <p>
      The default is to comment out this macro.
    </p>


    <h3><a
    name="TILDE_USER_PWFILE"><code>#define&nbsp;TILDE_USER_PWFILE</code></a></h3>

    <p>
      If defined then the user's name will be looked up in the password file
      and the corresponding home directory with the string "<code><a
      href="#PUB_HTML">#define&nbsp;PUB_HTML</a></code>" appended will be the
      root directory.  This will fail if the user's uid is less than "<code><a
      href="#LEAST_UID">#define&nbsp;LEAST_UID</a></code>".  See the section
      "<a href="tilde.html#home_directory">Hierarchies in User Home
      Directories</a>" in this guide for more details.
    </p>

    <p>
      The default is to comment out this macro.
    </p>


    <h3><a
    name="TILDE_USER_STRING"><code>#define&nbsp;TILDE_USER_STRING</code></a></h3>

    <p>
      URL indicating a user's home page. You can also use something like
      "<code>/homepages/</code>" or "<code>/people/</code>" for this but use
      "<code>/~</code>" to make "<code>http://hostname/~user/</code>" work.
      This appears to be a de facto standard.  See the section "<a
      href="tilde.html#home_directory">Hierarchies in User Home
      Directories</a>" in this guide for more details.
    </p>

    <p>
      The default is <code>"/~"</code>.
    </p>


    <h3><a
    name="USE_VIRTUAL_HOSTS"><code>#define&nbsp;USE_VIRTUAL_HOSTS</code></a></h3>

    <p>
      If defined to the full path to the file of virtual hosts,
      <code>wnsd</code> will support multi-homed or virtual hosts as described
      in the chapter "<a href="multi.html">Multi-homed or Virtual Servers on
      the <em>WN</em> Server</a>" in this guide.
    </p>

    <p>
      The default is to comment out this macro.
    </p>


    <h3><a name="USERID"><code>#define&nbsp;USERID</code></a></h3>

    <p>
      The user id you want <code>wnd</code> to switch to when running under the
      UNIX <a
      href="http://linux-howto.com/man/man8/inetd.8.html"><code>inetd(8)</code></a>
      system utility or when <code>wnsd</code> is run by <code>root</code>.
      When running under <code>inetd(8)</code> it should agree with the uid you
      set in the UNIX <a
      href="http://linux-howto.com/man/man8/inetd.8.html"><code>inetd.conf(5)</code></a>
      configuration file.
    </p>

    <p>
      The default depends on your system type but is generally something like
      <code>nobody</code>.
    </p>


    <h3><a name="VERBOSELOG"><code>#define&nbsp;VERBOSELOG</code></a></h3>

    <p>
      By default <em>WN</em> uses the "Common Log Format" used by <a
      href="http://www.w3c.org/Daemon/">CERN httpd</a> and <a
      href="http://hoohoo.ncsa.uiuc.edu/">NCSA httpd</a>.  Uncommenting this
      will cause additional information to be added to the end of each log
      line.  In particular the <code>User-Agent</code> and
      <code>Referrer</code> are logged.
    </p>

    <blockquote>
      <em>Note:</em> I have chosen to use the correct spelling of
      <code>Referrer</code> in the log file.  To enable interoperability and to
      comply with the <a href="http://hoohoo.ncsa.uiuc.edu/cgi/">CGI/1.1</a>
      specification it is necessary elsewhere to use the incorrect spelling
      <code>Referer</code> and the CGI environment variable <a
      href="appendixD.html#cgi.HTTP_REFERER"><code>HTTP_REFERER</code></a>.
    </blockquote>

    <p>
      This can be overridden at runtime by using the <a
      href="appendixA1.html#v_opt"><code>-v</code></a> command line option.
   </p>

    <p>
      The default is to comment out this macro.
    </p>


    <h3><a
    name="VIRTUAL_HOSTS_FILE"><code>#define&nbsp;VIRTUAL_HOSTS_FILE</code></a></h3>

    <p>
      Full path to virtual hosts file.  See the section "<a
      href="multi.html#one_server_many_hosts.file">Using a Virtual Hosts List
      File</a>" in this guide.
    </p>

    <p>
      The default is to comment out this macro.
    </p>


    <h3><a
    name="WN_ERRLOGFILE"><code>#define&nbsp;WN_ERRLOGFILE</code></a></h3>

    <p>
      Same as for "<a
      href="#WN_LOGFILE"><code>#define&nbsp;WN_LOGFILE</code></a>"
      except for error messages.  To override use the <a
      href="appendixA1.html#l_opt"><code>-l</code></a> option.
    </p>

    <p>
      The default is <code>"/usr/local/wnlogs/wn.log.err"</code>.
    </p>


    <h3><a name="WN_HOSTNAME"><code>#define&nbsp;WN_HOSTNAME</code></a></h3>

    <p>
      If the default value of <code>""</code> is used <em>WN</em> will get the
      default hostname from your system.  If you supply a name it should be a
      fully qualified domain name.  <em>WN</em> will attempt to use the UNIX <a
      href="http://linux-howto.com/man/man3/gethostbyname.3.html"><code>gethostbyname(3)</code></a>
      system call to find the IP address of your server.
    </p>

    <p>
      The default value is <code>""</code>.
    </p>


    <h3><a name="WN_LOGFILE"><code>#define&nbsp;WN_LOGFILE</code></a></h3>

    <p>
      Full path of the file you want to use for a log file.  The values set
      here are overridden by the <a
      href="appendixA1.html#L_opt"><code>-L</code></a> option.  To use the UNIX
      <a
      href="http://linux-howto.com/man/man8/syslogd.8.html"><code>syslogd(8)</code></a>
      system utility run <code>wnsd</code> or <code>wnd</code> with the <a
      href="appendixA1.html#S_opt"><code>-S</code></a> command line option.  To
      do no logging set above to <code>""</code>, the empty string.
    </p>

    <p>
      The default is <code>"/usr/local/wnlogs/wn.log"</code>.
    </p>



    <!-- #end -->
    <hr size="4">

    <address>
      <em>WN</em> version 2.0.3
      <br>
      Copyright &copy; 1998 <a href="mailto:john@math.nwu.edu">John Franks
      &lt;john@math.nwu.edu&gt;</a>
      <br>
      licensed under the <a href="http://www.opencontent.org/opl.html">
      OpenContent Public License</a>
      <br>
      last-modified: Tue, 22 Sep 1998 14:55:00 GMT
    </address>

    <!-- pnuts --> <a href="appendixF.html">[Previous]</a> <a href="howindex.html">[Next]</a> <a href="manual.html">[Up]</a> <a href="manual.html">[Top]</a> <a href="dosearch.html">[Search]</a> <a href="docindex.html">[Index]</a>
  </body>
</html>