source: trunk/minix/commands/httpd/httpd.conf.5@ 11

Last change on this file since 11 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

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