1 | .TH HTTPD.CONF 5
|
---|
2 | .SH NAME
|
---|
3 | httpd.conf httpd.mtype \- configuration files for the Minix httpd web server
|
---|
4 | .SH SYNOPSIS
|
---|
5 | .B /etc/httpd.conf
|
---|
6 | .B /etc/httpd.mtype
|
---|
7 | .SH DESCRIPTION
|
---|
8 | .B /etc/httpd.conf
|
---|
9 | is the configuration file for the Minix httpd web server written by
|
---|
10 | Michael Temari. A sample version is included with the distribution
|
---|
11 | archive and is unpacked in the source directory (normally
|
---|
12 | .BI /usr/local/src/httpdxxx).
|
---|
13 | Also provided is an example
|
---|
14 | .B httpd.mtype
|
---|
15 | file. This is an extension of the main configuration file which is normally
|
---|
16 | included when the main file is read.
|
---|
17 | .P
|
---|
18 | The makefile does not install
|
---|
19 | .B httpd.conf
|
---|
20 | and
|
---|
21 | .B httpd.mtype
|
---|
22 | automatically. The sample files included in the distribution are only
|
---|
23 | examples, you must copy it and edit them for the needs of your own
|
---|
24 | installation.
|
---|
25 | .SH CONFIGURATION FILE FORMAT
|
---|
26 | .B httpd.conf
|
---|
27 | is an ascii file which consists of lines of the following form:
|
---|
28 | .P
|
---|
29 | .B directive LWS [parameters separated by LWS]
|
---|
30 | .br
|
---|
31 | NOTE: LWS denotes Linear White Space which is spaces and/or tabs
|
---|
32 | .SH CONFIGURATION FILE DIRECTIVES
|
---|
33 | The following are valid configuration file directives (listed in the order
|
---|
34 | they appear in the sample
|
---|
35 | .B httpd.conf
|
---|
36 | file provided in the distribution):
|
---|
37 | .P
|
---|
38 | .B serverroot user chroot logfile dbgfile dirsend direxec vhost auth
|
---|
39 | .B proxyauth vpath include mtype
|
---|
40 | .P
|
---|
41 | To make the file more readable, for directives which occupy multiple
|
---|
42 | lines you may eliminate the directive on lines after the first and begin
|
---|
43 | these lines with LWS.
|
---|
44 |
|
---|
45 | .SH DESCRIPTIONS OF DIRECTIVES
|
---|
46 | .P
|
---|
47 | .B serverroot path
|
---|
48 |
|
---|
49 | The
|
---|
50 | .B serverroot
|
---|
51 | directive sets the translation for
|
---|
52 | .B //
|
---|
53 | to the given
|
---|
54 | .B path.
|
---|
55 |
|
---|
56 | .B user username
|
---|
57 |
|
---|
58 | The
|
---|
59 | .B user
|
---|
60 | directive causes the server to run as the given
|
---|
61 | .B username
|
---|
62 | otherwise the server will run as whoever started it (normally root).
|
---|
63 |
|
---|
64 | .B chroot directory
|
---|
65 |
|
---|
66 | The
|
---|
67 | .B chroot
|
---|
68 | directive causes the server to chroot to the given directory after
|
---|
69 | the configuration and log files have been opened. Normally this will be the
|
---|
70 | home directory of the given username in the user directive.
|
---|
71 | .br
|
---|
72 | NOTE:
|
---|
73 | .B /~user
|
---|
74 | will be translated to the home directory of
|
---|
75 | .B user.
|
---|
76 | .br
|
---|
77 | NOTE:
|
---|
78 | .B //
|
---|
79 | will be translated to the serverroot directory.
|
---|
80 | .br
|
---|
81 | NOTE: if this directive is used then beware of the consequences.
|
---|
82 |
|
---|
83 | .B logfile filename
|
---|
84 |
|
---|
85 | The
|
---|
86 | .B logfile
|
---|
87 | directive tells the server where to log http transactions.
|
---|
88 | .br
|
---|
89 | NOTE: the log file must exist to enable logging.
|
---|
90 |
|
---|
91 | .B dbgfile filename
|
---|
92 |
|
---|
93 | The
|
---|
94 | .B dbgfile
|
---|
95 | directive tells the server where to log debugging of http transactions.
|
---|
96 | .br
|
---|
97 | NOTE: the debug log file must exist to enable debug logging.
|
---|
98 |
|
---|
99 | .B dirsend filelist
|
---|
100 |
|
---|
101 | The
|
---|
102 | .B dirsend
|
---|
103 | directive tells the server that when a directory is requested
|
---|
104 | that it should send the first file that it finds in the directory from the
|
---|
105 | .B filelist
|
---|
106 | for the request.
|
---|
107 |
|
---|
108 | .B direxec program
|
---|
109 |
|
---|
110 | The
|
---|
111 | .B direxec
|
---|
112 | directive tells the server that when a directory is requested
|
---|
113 | and no file is found from the
|
---|
114 | .B dirsend
|
---|
115 | directive that it should run the given
|
---|
116 | .B program.
|
---|
117 | .br
|
---|
118 | NOTE: the program normally generates a directory listing on the fly using
|
---|
119 | the
|
---|
120 | .B dir2html
|
---|
121 | program.
|
---|
122 | .br
|
---|
123 | NOTE: the program access is considered
|
---|
124 | .B X
|
---|
125 | with no access restrictions.
|
---|
126 |
|
---|
127 | .B vhost hostname vhostroot
|
---|
128 |
|
---|
129 | The
|
---|
130 | .B vhost
|
---|
131 | directive is for defining access for virtual hosts. If none are configured
|
---|
132 | then any host is accepted. If specified then access is only granted for
|
---|
133 | requests for hosts which are configured here. In the
|
---|
134 | .B vpath
|
---|
135 | section below the
|
---|
136 | .B ///
|
---|
137 | gets translated to the corresponding
|
---|
138 | .B vhostroot.
|
---|
139 |
|
---|
140 |
|
---|
141 | .B auth authname authdescription access [passwdfile [users]]
|
---|
142 |
|
---|
143 | The
|
---|
144 | .B auth
|
---|
145 | directive sets up different authorizations with the server. The
|
---|
146 | .B authname
|
---|
147 | is the name given to the authorization and is case insensitive.
|
---|
148 | The
|
---|
149 | .B authdescription
|
---|
150 | is the description of the authorization and is what
|
---|
151 | the user will see when asked to enter a username and password. The
|
---|
152 | access is one or more of
|
---|
153 | .B (RWX).
|
---|
154 | .B R
|
---|
155 | tells the server the URL can be read.
|
---|
156 | .B W
|
---|
157 | tells the server the URL can be overwritten.
|
---|
158 | .B X
|
---|
159 | tells the server
|
---|
160 | that the URL can and should be executed. Access is in addition to normal
|
---|
161 | Unix security considerations. For instance a file that can be written to
|
---|
162 | that does not have the
|
---|
163 | .B W
|
---|
164 | access will have an error returned. The
|
---|
165 | .B passwdfile
|
---|
166 | is the name of the password file to validate users against. If
|
---|
167 | .B passwdfile
|
---|
168 | is given as
|
---|
169 | .B '.'
|
---|
170 | then the system password file
|
---|
171 | .B (/etc/passwd)
|
---|
172 | will be used. If no
|
---|
173 | .B passwdfile
|
---|
174 | is given then no authorization is allowed for anyone. If no
|
---|
175 | .B users
|
---|
176 | are given then any validated user is authorized, otherwise only the given
|
---|
177 | .B users
|
---|
178 | are allowed.
|
---|
179 |
|
---|
180 | .B proxyauth authname authdescription access [passwdfile [users]]
|
---|
181 |
|
---|
182 | The
|
---|
183 | .B proxyauth
|
---|
184 | directive defines access authorization to be used for Proxy access.
|
---|
185 | .br
|
---|
186 | .B authname
|
---|
187 | = Same as auth above
|
---|
188 | .br
|
---|
189 | .B authdescription
|
---|
190 | = Same as auth above
|
---|
191 | .br
|
---|
192 | .B access
|
---|
193 | = Must be R to allow proxy
|
---|
194 | .br
|
---|
195 | .B passwdfile
|
---|
196 | = Same as auth above
|
---|
197 | .br
|
---|
198 | .B users
|
---|
199 | = Same as auth above
|
---|
200 |
|
---|
201 | .B vpath from to [auth [access]]
|
---|
202 |
|
---|
203 | The
|
---|
204 | .B vpath
|
---|
205 | directive sets up URL path translations and authorizations. A
|
---|
206 | requested URL that matches
|
---|
207 | .B from
|
---|
208 | will be translated to
|
---|
209 | .B to
|
---|
210 | with the given
|
---|
211 | .B auth
|
---|
212 | and
|
---|
213 | .B access.
|
---|
214 | If
|
---|
215 | .B auth
|
---|
216 | does not exist then the URL will have no
|
---|
217 | .B access.
|
---|
218 | If
|
---|
219 | .B access
|
---|
220 | is not given then the access is taken from the
|
---|
221 | .B auth
|
---|
222 | record (see above). A
|
---|
223 | .B '.'
|
---|
224 | in place of the
|
---|
225 | .B to
|
---|
226 | means that the server should use a translation from another
|
---|
227 | .B vpath
|
---|
228 | record, but associate the given
|
---|
229 | .B auth
|
---|
230 | and access with the requested URL. A
|
---|
231 | .B '*'
|
---|
232 | may be at the end only of the
|
---|
233 | .B from
|
---|
234 | to provide a wildcard match. For example if the
|
---|
235 | .B from
|
---|
236 | has
|
---|
237 | .B /AB*
|
---|
238 | then any of
|
---|
239 | .B /ABCDEF
|
---|
240 | or
|
---|
241 | .B /AB
|
---|
242 | or
|
---|
243 | .B /ABmichael
|
---|
244 | will match, but
|
---|
245 | .B /AD or
|
---|
246 | .B /a
|
---|
247 | will not. The requested URL is first checked against each
|
---|
248 | .B vpath
|
---|
249 | record until an exact match (meaning URL match
|
---|
250 | .B from
|
---|
251 | and
|
---|
252 | .B from
|
---|
253 | had no
|
---|
254 | .B '*')
|
---|
255 | is found or the end of the list. Therefore a wildcard match will match
|
---|
256 | the last
|
---|
257 | .B from in the list in which it matched.
|
---|
258 | .br
|
---|
259 | NOTE: if at the beginning of the to field
|
---|
260 | .br
|
---|
261 | /~user will get translated to the home directory of the given user
|
---|
262 | .br
|
---|
263 | // wile get translated to the serverroot directory
|
---|
264 |
|
---|
265 | .B include filename
|
---|
266 |
|
---|
267 | The
|
---|
268 | .B include
|
---|
269 | directive tells the server to read configuration information
|
---|
270 | from the given filename.
|
---|
271 | .br
|
---|
272 | NOTE: normally you get
|
---|
273 | .B mtype
|
---|
274 | directives in an included file.
|
---|
275 |
|
---|
276 | .B mtype mimetype extensions
|
---|
277 |
|
---|
278 | The
|
---|
279 | .B mtype
|
---|
280 | directive tells the server what
|
---|
281 | .B mimetype
|
---|
282 | to associate with files which have any of the given
|
---|
283 | .B extensions.
|
---|
284 | If no match is found then the file will be treated as
|
---|
285 | .B application/octet-stream.
|
---|
286 |
|
---|
287 |
|
---|
288 | .SH FILES
|
---|
289 | .B /etc/httpd.conf
|
---|
290 | .B /etc/httpd.mtype
|
---|
291 | .B /etc/passwd
|
---|
292 | .SH "SEE ALSO"
|
---|
293 | .BR httpd (8)
|
---|
294 | .BR http_status (5)
|
---|
295 | .SH NOTES
|
---|
296 | The source directory contains a commented sample
|
---|
297 | .B httpd.conf
|
---|
298 | and
|
---|
299 | .B httpd.mtype
|
---|
300 | files
|
---|
301 | P.
|
---|
302 | You can run the server as
|
---|
303 | .B httpd -t /etc/httpd.conf
|
---|
304 | to see whether the configuration file is being parsed correctly.
|
---|
305 | .P
|
---|
306 | Although standard Minix does not have a graphical interface to support
|
---|
307 | browsers such as Netscape and Microsoft Internet Explorer, the
|
---|
308 | .B lynx
|
---|
309 | browser can be used on 32-bit Minix systems with enough memory. You can point
|
---|
310 | lynx to your own site to browse your own pages.
|
---|
311 | When debugging a web server there is nothing quite like browsing your own
|
---|
312 | pages to see whether things are working right. That said, be aware that
|
---|
313 | different web browsers may vary in how they interpet standard web page
|
---|
314 | features, and will certainly vary in how they interpret "extensions" to
|
---|
315 | the HTML standards. So checking a page with several browsers on several
|
---|
316 | platforms is always a good idea.
|
---|
317 | .SH BUGS
|
---|
318 | Not really a bug, but you can get in trouble if a real directory you want
|
---|
319 | to access shares the first part of its name with a
|
---|
320 | .B vpath
|
---|
321 | definition. You just have to pay attention to the directory names you use.
|
---|
322 | .SH AUTHOR
|
---|
323 | The Minix httpd server was created by and is maintained by Michael Temari
|
---|
324 | <Michael@TemWare.Com>
|
---|
325 | .br
|
---|
326 | This man page was compiled by Al Woodhull <awoodhull@hampshire.edu>
|
---|
327 | .P
|
---|
328 | updated 2003-07-06
|
---|