| @@ -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 |
52 | The | | 53 | The |
53 | .Nm | | 54 | .Nm |
54 | program reads a | | 55 | program reads a |
55 | .Em HTTP | | 56 | .Em HTTP |
56 | request from the standard input, and sends a reply to the standard output. | | 57 | request from the standard input, and sends a reply to the standard output. |
57 | Besides ~user translation and virtual hosting support (see below), all file | | 58 | Besides ~user translation and virtual hosting support (see below), all file |
58 | requests are from | | 59 | requests 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 |
114 | or | | 115 | or |
115 | .Fl U | | 116 | .Fl U |
116 | options. | | 117 | options. |
117 | .It Fl H | | 118 | .It Fl H |
118 | This option causes directory index mode to hide files and directories | | 119 | This option causes directory index mode to hide files and directories |
119 | that start with a period, except for | | 120 | that start with a period, except for |
120 | .Pa .. . | | 121 | .Pa .. . |
121 | Also see | | 122 | Also see |
122 | .Fl X . | | 123 | .Fl X . |
123 | .It Fl I Ar port | | 124 | .It Fl I Ar port |
124 | This option is only valid with the | | 125 | This option is only valid with the |
125 | .Fl b | | 126 | .Fl b |
126 | option. It causes | | 127 | option. |
| | | 128 | It causes |
127 | .Ar port | | 129 | .Ar port |
128 | to use used as the port to bind daemon mode. | | 130 | to use used as the port to bind daemon mode. |
129 | The default is the | | 131 | The default is the |
130 | .Dq http | | 132 | .Dq http |
131 | port. | | 133 | port. |
132 | .It Fl i Ar address | | 134 | .It Fl i Ar address |
133 | This option is only valid with the | | 135 | This option is only valid with the |
134 | .Fl b | | 136 | .Fl b |
135 | option. It causes | | 137 | option. |
| | | 138 | It causes |
136 | .Ar address | | 139 | .Ar address |
137 | to use used as the address to bind daemon mode. | | 140 | to use used as the address to bind daemon mode. |
138 | If otherwise unspecified, the address used to bind is derived from the | | 141 | If otherwise unspecified, the address used to bind is derived from the |
139 | .Ar myname , | | 142 | .Ar myname , |
140 | which defaults to the name returned by | | 143 | which 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 |
143 | This option adds a new entry to the table that converts file suffixes to | | 146 | This option adds a new entry to the table that converts file suffixes to |
144 | content type and encoding. | | 147 | content type and encoding. |
145 | This option takes four additional arguments containing | | 148 | This option takes four additional arguments containing |
146 | the file prefix, its | | 149 | the 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 |
243 | section for an example of using this option. | | 246 | section for an example of using this option. |
244 | .It Fl X | | 247 | .It Fl X |
245 | This option enables directory indexing. | | 248 | This option enables directory indexing. |
246 | A directory index will be generated only when the default file (i.e. | | 249 | A directory index will be generated only when the default file (i.e. |
247 | .Pa index.html | | 250 | .Pa index.html |
248 | normally) is not present. | | 251 | normally) is not present. |
249 | .It Fl x Ar index | | 252 | .It Fl x Ar index |
250 | This option changes the default file read for directories from | | 253 | This option changes the default file read for directories from |
251 | .Dq index.html | | 254 | .Dq index.html |
252 | to | | 255 | to |
253 | .Ar index . | | 256 | .Ar index . |
254 | .It Fl Z Ar certificate_path privatekey_path | | 257 | .It Fl Z Ar certificate_path privatekey_path |
255 | This option sets the path to the server certificate file and the private key file | | 258 | This option sets the path to the server certificate file and the private key file |
256 | in pem format. It also causes | | 259 | in pem format. |
| | | 260 | It also causes |
257 | .Nm | | 261 | .Nm |
258 | to start SSL mode. | | 262 | to start SSL mode. |
259 | .El | | 263 | .El |
260 | .Pp | | 264 | .Pp |
261 | Note that in | | 265 | Note that in |
262 | .Nm | | 266 | .Nm |
263 | versions 20031005 and prior that supported the | | 267 | versions 20031005 and prior that supported the |
264 | .Fl C | | 268 | .Fl C |
265 | and | | 269 | and |
266 | .Fl M | | 270 | .Fl M |
267 | options, they took a single space-separated argument that was parsed. | | 271 | options, they took a single space-separated argument that was parsed. |
268 | since version 20040828, they take multiple options (2 in the case of | | 272 | since 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 |
357 | authentication scheme. | | 361 | authentication scheme. |
358 | .Pp | | 362 | .Pp |
359 | Note: | | 363 | Note: |
360 | This does not recursively protect any sub-directories. | | 364 | This does not recursively protect any sub-directories. |
361 | .Pp | | 365 | .Pp |
362 | The | | 366 | The |
363 | .Pa .htpasswd | | 367 | .Pa .htpasswd |
364 | file contains lines delimited with a colon containing | | 368 | file contains lines delimited with a colon containing |
365 | usernames and passwords hashed with | | 369 | usernames and passwords hashed with |
366 | .Xr crypt 3 , | | 370 | .Xr crypt 3 , |
367 | for example: | | 371 | for example: |
368 | .Bd -literal | | 372 | .Bd -literal |
369 | heather:$1$pZWI4tH/$DzDPl63i6VvVRv2lJNV7k1 | | 373 | heather:$1$pZWI4tH/$DzDPl63i6VvVRv2lJNV7k1 |
370 | jeremy:A.xewbx2DpQ8I | | 374 | jeremy:A.xewbx2DpQ8I |
371 | .Ed | | 375 | .Ed |
372 | .Pp | | 376 | .Pp |
373 | On | | 377 | On |
374 | .Nx , | | 378 | .Nx , |
375 | the | | 379 | the |
376 | .Xr pwhash 1 | | 380 | .Xr pwhash 1 |
377 | utility may be used to generate hashed passwords. | | 381 | utility may be used to generate hashed passwords. |
378 | .Pp | | 382 | .Pp |
379 | While | | 383 | While |
380 | .Nm | | 384 | .Nm |
381 | distributed with | | 385 | distributed with |
382 | .Nx | | 386 | .Nx |
383 | has support for HTTP Basic Authorisation enabled by default, | | 387 | has support for HTTP Basic Authorisation enabled by default, |
384 | the portable distribution it is excluded. | | 388 | the portable distribution it is excluded. |
385 | Compile | | 389 | Compile |
386 | .Nm | | 390 | .Nm |
387 | with | | 391 | with |
388 | .Dq -DDO_HTPASSWD | | 392 | .Dq -DDO_HTPASSWD |
389 | on the compiler command line to enable this support. It may require | | 393 | on the compiler command line to enable this support. |
| | | 394 | It may require |
390 | linking with the crypt library, using | | 395 | linking with the crypt library, using |
391 | .Dq -lcrypt . | | 396 | .Dq -lcrypt . |
392 | .Sh FILES | | 397 | .Sh FILES |
393 | .Nm | | 398 | .Nm |
394 | looks for a couple of special files in directories that allow certain features | | 399 | looks for a couple of special files in directories that allow certain features |
395 | to be provided on a per-directory basis. | | 400 | to be provided on a per-directory basis. |
396 | In addition to the | | 401 | In addition to the |
397 | .Pa .htpasswd | | 402 | .Pa .htpasswd |
398 | used by HTTP basic authorisation, | | 403 | used by HTTP basic authorisation, |
399 | if a | | 404 | if a |
400 | .Pa .bzdirect | | 405 | .Pa .bzdirect |
401 | file is found (contents are irrelevant) | | 406 | file is found (contents are irrelevant) |
402 | .Nm | | 407 | .Nm |
403 | will allow direct access even with the | | 408 | will allow direct access even with the |
404 | .Fl r | | 409 | .Fl r |
405 | option. | | 410 | option. |
406 | If a | | 411 | If a |
407 | .Pa .bzredirect | | 412 | .Pa .bzredirect |
408 | symbolic link is found, | | 413 | symbolic link is found, |
409 | .Nm | | 414 | .Nm |
410 | will perform a smart redirect to the target of this symlink. | | 415 | will perform a smart redirect to the target of this symlink. |
411 | The target is assumed to live on the same server. | | 416 | The target is assumed to live on the same server. |
412 | If a | | 417 | If a |
413 | .Pa .bzabsredirect | | 418 | .Pa .bzabsredirect |
414 | symbolic link is found, | | 419 | symbolic link is found, |
415 | .Nm | | 420 | .Nm |
416 | will redirect to the absolute url pointed to by this symlink. | | 421 | will redirect to the absolute url pointed to by this symlink. |
417 | This is useful to redirect to different servers. | | 422 | This is useful to redirect to different servers. |
418 | .Sh SSL SUPPORT | | 423 | .Sh SSL SUPPORT |
419 | .Nm | | 424 | .Nm |
420 | has support for SSLv2, SSLv3, and TLSv1 protocols that is included by | | 425 | has support for SSLv2, SSLv3, and TLSv1 protocols that is included by |
421 | default. It requires linking with the crypto and ssl library, using | | 426 | default. |
| | | 427 | It requires linking with the crypto and ssl library, using |
422 | .Dq -lcrypto -lssl . | | 428 | .Dq -lcrypto -lssl . |
423 | To disable SSL SUPPORT compile | | 429 | To disable SSL SUPPORT compile |
424 | .Nm | | 430 | .Nm |
425 | with | | 431 | with |
426 | .Dq -DNO_SSL_SUPPORT | | 432 | .Dq -DNO_SSL_SUPPORT |
427 | on the compiler command line. | | 433 | on 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 |
432 | The | | 438 | The |
433 | .Nm | | 439 | .Nm |
434 | program was first written in perl, based on another perl http server | | 440 | program was first written in perl, based on another perl http server |