Sat Dec 6 13:18:09 2008 UTC ()
add -t chrootdir to SYNOPSIS, mdoclint


(jnemeth)
diff -r1.5 -r1.6 src/libexec/httpd/bozohttpd.8

cvs diff -r1.5 -r1.6 src/libexec/httpd/bozohttpd.8 (expand / switch to unified diff)

--- src/libexec/httpd/bozohttpd.8 2008/09/13 14:00:34 1.5
+++ src/libexec/httpd/bozohttpd.8 2008/12/06 13:18:09 1.6
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: bozohttpd.8,v 1.5 2008/09/13 14:00:34 reed Exp $ 1.\" $NetBSD: bozohttpd.8,v 1.6 2008/12/06 13:18:09 jnemeth Exp $
2.\" 2.\"
3.\" $eterna: bozohttpd.8,v 1.78 2008/03/03 03:36:11 mrg Exp $ 3.\" $eterna: bozohttpd.8,v 1.78 2008/03/03 03:36:11 mrg Exp $
4.\" 4.\"
5.\" Copyright (c) 1997-2008 Matthew R. Green 5.\" Copyright (c) 1997-2008 Matthew R. Green
6.\" All rights reserved. 6.\" All rights reserved.
7.\" 7.\"
8.\" Redistribution and use in source and binary forms, with or without 8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions 9.\" modification, are permitted provided that the following conditions
10.\" are met: 10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright 11.\" 1. Redistributions of source code must retain the above copyright
12.\" notice, this list of conditions and the following disclaimer. 12.\" notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\" notice, this list of conditions and the following disclaimer in the 14.\" notice, this list of conditions and the following disclaimer in the
@@ -18,41 +18,42 @@ @@ -18,41 +18,42 @@
18.\" 18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 19.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 20.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 22.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 23.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 25.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29.\" SUCH DAMAGE. 29.\" SUCH DAMAGE.
30.\" 30.\"
31.Dd March 3, 2008 31.Dd December 6, 2008
32.Dt HTTPD 8 32.Dt HTTPD 8
33.Sh NAME 33.Sh NAME
34.Nm httpd 34.Nm httpd
35.Nd hyper text transfer protocol version 1.1 daemon 35.Nd hyper text transfer protocol version 1.1 daemon
36.Sh SYNOPSIS 36.Sh SYNOPSIS
37.Nm 37.Nm
38.Op Fl HVXbenrus 38.Op Fl HVXbenrus
39.Op Fl C Ar suffix cgihandler 39.Op Fl C Ar suffix cgihandler
40.Op Fl I Ar port 40.Op Fl I Ar port
41.Op Fl M Ar suffix type encoding encoding11 41.Op Fl M Ar suffix type encoding encoding11
42.Op Fl S Ar server_software 42.Op Fl S Ar server_software
43.Op Fl c Ar cgibin 43.Op Fl c Ar cgibin
44.Op Fl i Ar address 44.Op Fl i Ar address
45.Op Fl p Ar pubdir 45.Op Fl p Ar pubdir
 46.Op Fl t Ar chrootdir
46.Op Fl v Ar virtualroot 47.Op Fl v Ar virtualroot
47.Op Fl x Ar index 48.Op Fl x Ar index
48.Op Fl Z Ar cert privkey 49.Op Fl Z Ar cert privkey
49.Ar slashdir 50.Ar slashdir
50.Op Ar myname 51.Op Ar myname
51.Sh DESCRIPTION 52.Sh DESCRIPTION
52The 53The
53.Nm 54.Nm
54program reads a 55program reads a
55.Em HTTP 56.Em HTTP
56request from the standard input, and sends a reply to the standard output. 57request from the standard input, and sends a reply to the standard output.
57Besides ~user translation and virtual hosting support (see below), all file 58Besides ~user translation and virtual hosting support (see below), all file
58requests are from 59requests are from
@@ -113,36 +114,38 @@ to not clear the environment when used w @@ -113,36 +114,38 @@ to not clear the environment when used w
113.Fl t 114.Fl t
114or 115or
115.Fl U 116.Fl U
116options. 117options.
117.It Fl H 118.It Fl H
118This option causes directory index mode to hide files and directories 119This option causes directory index mode to hide files and directories
119that start with a period, except for 120that start with a period, except for
120.Pa .. . 121.Pa .. .
121Also see 122Also see
122.Fl X . 123.Fl X .
123.It Fl I Ar port 124.It Fl I Ar port
124This option is only valid with the 125This option is only valid with the
125.Fl b 126.Fl b
126option. It causes 127option.
 128It causes
127.Ar port 129.Ar port
128to use used as the port to bind daemon mode. 130to use used as the port to bind daemon mode.
129The default is the 131The default is the
130.Dq http 132.Dq http
131port. 133port.
132.It Fl i Ar address 134.It Fl i Ar address
133This option is only valid with the 135This option is only valid with the
134.Fl b 136.Fl b
135option. It causes 137option.
 138It causes
136.Ar address 139.Ar address
137to use used as the address to bind daemon mode. 140to use used as the address to bind daemon mode.
138If otherwise unspecified, the address used to bind is derived from the 141If otherwise unspecified, the address used to bind is derived from the
139.Ar myname , 142.Ar myname ,
140which defaults to the name returned by 143which defaults to the name returned by
141.Xr gethostname 3 . 144.Xr gethostname 3 .
142.It Fl M Ar suffix type encoding encoding11 145.It Fl M Ar suffix type encoding encoding11
143This option adds a new entry to the table that converts file suffixes to 146This option adds a new entry to the table that converts file suffixes to
144content type and encoding. 147content type and encoding.
145This option takes four additional arguments containing 148This option takes four additional arguments containing
146the file prefix, its 149the file prefix, its
147.Dq Content-Type , 150.Dq Content-Type ,
148.Dq Content-Encoding 151.Dq Content-Encoding
@@ -243,27 +246,28 @@ See the @@ -243,27 +246,28 @@ See the
243section for an example of using this option. 246section for an example of using this option.
244.It Fl X 247.It Fl X
245This option enables directory indexing. 248This option enables directory indexing.
246A directory index will be generated only when the default file (i.e. 249A directory index will be generated only when the default file (i.e.
247.Pa index.html 250.Pa index.html
248normally) is not present. 251normally) is not present.
249.It Fl x Ar index 252.It Fl x Ar index
250This option changes the default file read for directories from 253This option changes the default file read for directories from
251.Dq index.html 254.Dq index.html
252to 255to
253.Ar index . 256.Ar index .
254.It Fl Z Ar certificate_path privatekey_path 257.It Fl Z Ar certificate_path privatekey_path
255This option sets the path to the server certificate file and the private key file 258This option sets the path to the server certificate file and the private key file
256in pem format. It also causes 259in pem format.
 260It also causes
257.Nm 261.Nm
258to start SSL mode. 262to start SSL mode.
259.El 263.El
260.Pp 264.Pp
261Note that in 265Note that in
262.Nm 266.Nm
263versions 20031005 and prior that supported the 267versions 20031005 and prior that supported the
264.Fl C 268.Fl C
265and 269and
266.Fl M 270.Fl M
267options, they took a single space-separated argument that was parsed. 271options, they took a single space-separated argument that was parsed.
268since version 20040828, they take multiple options (2 in the case of 272since version 20040828, they take multiple options (2 in the case of
269.Fl C 273.Fl C
@@ -356,79 +360,81 @@ using the RFC 2617 HTTP @@ -356,79 +360,81 @@ using the RFC 2617 HTTP
356.Dq Basic 360.Dq Basic
357authentication scheme. 361authentication scheme.
358.Pp 362.Pp
359Note: 363Note:
360This does not recursively protect any sub-directories. 364This does not recursively protect any sub-directories.
361.Pp 365.Pp
362The 366The
363.Pa .htpasswd 367.Pa .htpasswd
364file contains lines delimited with a colon containing 368file contains lines delimited with a colon containing
365usernames and passwords hashed with 369usernames and passwords hashed with
366.Xr crypt 3 , 370.Xr crypt 3 ,
367for example: 371for example:
368.Bd -literal 372.Bd -literal
369heather:$1$pZWI4tH/$DzDPl63i6VvVRv2lJNV7k1  373heather:$1$pZWI4tH/$DzDPl63i6VvVRv2lJNV7k1
370jeremy:A.xewbx2DpQ8I 374jeremy:A.xewbx2DpQ8I
371.Ed 375.Ed
372.Pp 376.Pp
373On 377On
374.Nx , 378.Nx ,
375the 379the
376.Xr pwhash 1 380.Xr pwhash 1
377utility may be used to generate hashed passwords. 381utility may be used to generate hashed passwords.
378.Pp 382.Pp
379While  383While
380.Nm 384.Nm
381distributed with 385distributed with
382.Nx 386.Nx
383has support for HTTP Basic Authorisation enabled by default, 387has support for HTTP Basic Authorisation enabled by default,
384the portable distribution it is excluded. 388the portable distribution it is excluded.
385Compile 389Compile
386.Nm 390.Nm
387with 391with
388.Dq -DDO_HTPASSWD 392.Dq -DDO_HTPASSWD
389on the compiler command line to enable this support. It may require 393on the compiler command line to enable this support.
 394It may require
390linking with the crypt library, using 395linking with the crypt library, using
391.Dq -lcrypt . 396.Dq -lcrypt .
392.Sh FILES 397.Sh FILES
393.Nm 398.Nm
394looks for a couple of special files in directories that allow certain features 399looks for a couple of special files in directories that allow certain features
395to be provided on a per-directory basis. 400to be provided on a per-directory basis.
396In addition to the 401In addition to the
397.Pa .htpasswd  402.Pa .htpasswd
398used by HTTP basic authorisation, 403used by HTTP basic authorisation,
399if a 404if a
400.Pa .bzdirect 405.Pa .bzdirect
401file is found (contents are irrelevant) 406file is found (contents are irrelevant)
402.Nm 407.Nm
403will allow direct access even with the 408will allow direct access even with the
404.Fl r 409.Fl r
405option. 410option.
406If a 411If a
407.Pa .bzredirect 412.Pa .bzredirect
408symbolic link is found, 413symbolic link is found,
409.Nm 414.Nm
410will perform a smart redirect to the target of this symlink. 415will perform a smart redirect to the target of this symlink.
411The target is assumed to live on the same server. 416The target is assumed to live on the same server.
412If a 417If a
413.Pa .bzabsredirect 418.Pa .bzabsredirect
414symbolic link is found, 419symbolic link is found,
415.Nm 420.Nm
416will redirect to the absolute url pointed to by this symlink. 421will redirect to the absolute url pointed to by this symlink.
417This is useful to redirect to different servers. 422This is useful to redirect to different servers.
418.Sh SSL SUPPORT 423.Sh SSL SUPPORT
419.Nm 424.Nm
420has support for SSLv2, SSLv3, and TLSv1 protocols that is included by 425has support for SSLv2, SSLv3, and TLSv1 protocols that is included by
421default. It requires linking with the crypto and ssl library, using 426default.
 427It requires linking with the crypto and ssl library, using
422.Dq -lcrypto -lssl . 428.Dq -lcrypto -lssl .
423To disable SSL SUPPORT compile 429To disable SSL SUPPORT compile
424.Nm 430.Nm
425with 431with
426.Dq -DNO_SSL_SUPPORT 432.Dq -DNO_SSL_SUPPORT
427on the compiler command line. 433on the compiler command line.
428.Sh SEE ALSO 434.Sh SEE ALSO
429.Xr inetd.conf 5 , 435.Xr inetd.conf 5 ,
430.Xr inetd 8 436.Xr inetd 8
431.Sh HISTORY 437.Sh HISTORY
432The 438The
433.Nm 439.Nm
434program was first written in perl, based on another perl http server 440program was first written in perl, based on another perl http server