summaryrefslogtreecommitdiff
path: root/www/bozohttpd/files/patch-bozohttpd.8
blob: 64267d5088ea9054d57238d994a314f846c183d7 (plain) (blame)
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
--- bozohttpd.8.orig	2020-10-15 04:35:06 UTC
+++ bozohttpd.8
@@ -354,12 +354,26 @@ since version 20040828, they take multiple options (2 
 .Fl C
 and 4 in the case of
 .Fl M . )
+.Ss DEFAULT CONFIGURATION
+On
+.Fx ,
+.Nm
+can be enabled as the default web server by adding the following options to
+.Pa /etc/rc.conf
+:
+.Bd -literal
+bozohttpd_enable (bool):      Set it to "YES" to enable bozohttpd.
+                              Default is "NO".
+bozohttpd_flags (str):        Options to pass to bozohttpd.
+                              Default is "-b -t /var/empty -U nobody /".
+                              The last argument, slashdir, is required.
+.Ed
 .Ss INETD CONFIGURATION
 As
 .Nm
-uses
+normally uses
 .Xr inetd 8
-by default to process incoming TCP connections for HTTP requests
+to process incoming TCP connections for HTTP requests
 (but see the
 .Fl b
 option),
@@ -371,8 +385,8 @@ A typical
 .Xr inetd.conf 5
 entry would be:
 .Bd -literal
-http stream tcp  nowait:600 _httpd /usr/libexec/httpd httpd /var/www
-http stream tcp6 nowait:600 _httpd /usr/libexec/httpd httpd /var/www
+http stream tcp  nowait:600 www /usr/local/bin/bozohttpd httpd /var/www
+http stream tcp6 nowait:600 www /usr/local/bin/bozohttpd httpd /var/www
 .Ed
 .Pp
 This would serve web pages from
@@ -386,7 +400,7 @@ requests per minute to 600, up from the
 default of 40.
 .Pp
 Using the
-.Nx
+.Fx
 .Xr inetd 8 ,
 you can provide multiple IP-address based HTTP servers by having multiple
 listening ports with different configurations.
@@ -438,15 +452,15 @@ jeremy:A.xewbx2DpQ8I
 .Ed
 .Pp
 On
-.Nx ,
+.Fx ,
 the
-.Xr pwhash 1
+.Xr openssl-passwd 1
 utility may be used to generate hashed passwords.
 .Pp
-While
+While the
+.Fx
+port of
 .Nm
-distributed with
-.Nx
 has support for HTTP Basic Authorization enabled by default,
 in the portable distribution it is excluded.
 Compile
@@ -456,21 +470,21 @@ with
 on the compiler command line to enable this support.
 It may require linking with the crypt library, using
 .Dq -lcrypt .
-.Ss BLOCKLIST SUPPORT
+.Ss BLACKLIST SUPPORT
 On
-.Nx ,
+.Fx ,
 .Nm
 supports
-.Xr blocklistd 8
+.Xr blacklistd 8
 by default.
 The support can be disabled with the
-.Dq -DNO_BLOCKLIST_SUPPORT
+.Dq -DNO_BLACKLIST_SUPPORT
 compilation option.
 .Pp
 Upon occurrence,
 .Nm
 reports two HTTP status codes to
-.Xr blocklistd 8
+.Xr blacklistd 8
 as failures:
 .Em 401
 (``Unauthorized'')
@@ -482,7 +496,7 @@ Of these,
 is the one received upon authorization failure with the
 HTTP Basic Authorization mechanism.
 A successful authorization decreases the counter kept by
-.Xr blocklistd 8 .
+.Xr blacklistd 8 .
 .Pp
 Note that the implementation of the HTTP Basic Authorization mechanism
 uses a redirection; a status code
@@ -491,7 +505,7 @@ is always initially received.
 Therefore, a single authorization failure of
 .Pa .htpasswd
 is reported as two failures to
-.Xr blocklistd 8 ,
+.Xr blacklistd 8 ,
 but no failures are recorded upon successful authorization
 due to the decrease of the failure counter.
 .Ss SSL SUPPORT
@@ -584,7 +598,7 @@ To configure set of virtual hosts, one would use an
 .Xr inetd.conf 5
 entry like:
 .Bd -literal
-http stream tcp  nowait:600 _httpd /usr/libexec/httpd httpd -v /var/vroot /var/www
+http stream tcp  nowait:600 www /usr/local/bin/bozohttpd httpd -v /var/vroot /var/www
 .Ed
 .Pp
 and inside
@@ -602,7 +616,7 @@ with PHP, one must use the
 option to specify a CGI handler for a particular file type.
 Typically this will be like:
 .Bd -literal
-httpd -C .php /usr/pkg/bin/php-cgi /var/www
+bozohttpd -C .php /usr/pkg/bin/php-cgi /var/www
 .Ed
 .Pp
 Note that a plain script interpreter can not be used directly as a cgihandler,
@@ -615,7 +629,7 @@ might do.
 .Pp
 It would be invoked like:
 .Bd -literal
-httpd -C .pl /www-scripts/bin/run.perl /var/www
+bozohttpd -C .pl /www-scripts/bin/run.perl /var/www
 .Ed
 and the script could look like:
 .Bd -literal
@@ -809,7 +823,7 @@ provided chroot and change-to-user support, and other 
 .An Jukka Ruohonen
 .Aq Mt jruoho@NetBSD.org
 provided support for
-.Xr blocklistd 8
+.Xr blacklistd 8
 .It
 .An Jared McNeill
 .Aq Mt jmcneill@NetBSD.org