source: rtems/cpukit/mghttpd/mongoose.1 @ 2d7ae960

4.115
Last change on this file since 2d7ae960 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 6.9 KB
Line 
1.\" Process this file with
2.\" groff -man -Tascii mongoose.1
3.Dd Dec 1, 2008
4.Dt mongoose 1
5.Sh NAME
6.Nm mongoose
7.Nd lightweight web server
8.Sh SYNOPSIS
9.Nm
10.Op Ar options
11.Op Ar config_file
12.Nm
13.Fl A Ar htpasswd_file domain_name user_name password
14.Sh DESCRIPTION
15.Nm
16is small, fast and easy to use web server with CGI, SSL, Digest Authorization
17support.
18.Pp
19.Nm
20does not detach from terminal, and uses current working directory
21as the web root, unless
22.Fl root
23option is specified.
24.Pp
25It is possible to specify multiple ports to listen on. For example, to
26make
27.Nm
28listen on HTTP port 80 and HTTPS port 443, one should start it as
29.Dq mongoose -ssl_cert cert.pem -ports 80,443s .
30.Pp
31Options may be specified in any order, with one exception: if SSL listening
32port is specified in the -ports option, then -ssl_cert option must be set
33before -ports option.
34.Pp
35Unlike other web servers,
36.Nm
37does not expect CGI scripts to be put in a special directory. CGI scripts may
38be anywhere. CGI files are recognized by the file extension.
39.Pp
40SSI files are also recognized by extension. Unknown SSI directives are silently
41ignored. Currently, two SSI directives supported, "include" and "exec". For the
42"include" directive, included file name can be specified in three different
43ways. Below is the summary of supported SSI directives:
44.Bl -bullet
45.It
46<!--#exec "shell command"--> Execute shell command.
47.It
48<!--#include "path"--> File path must be relative to the current document.
49.It
50<!--#include virtual="path"--> File path must be relative to the document root.
51.It
52<!--#include file="path"--> File path must be the absolute path.
53.El
54.Pp
55.Nm
56can use the configuration file. By default, it is "mongoose.conf", and if it
57is present in the same directory where
58.Nm
59lives, the command line options are read from it. Alternatively, the
60configuration file may be specified as a last argument. The format of the
61configuration file is exactly the same as for the command line options, the
62only difference is that the command line options must be specified on
63separate lines, and leading dashes for option names must be omitted.
64Lines beginning with '#' are regarded as comments and ignored.
65.Pp
66.Sh OPTIONS
67.Bl -tag -width indent
68.It Fl A Ar htpasswd_file domain_name user_name password
69Add/edit user's password in the passwords file. Deleting users can be done
70with any text editor. Functionality similar to Apache's
71.Ic htdigest
72utility.
73.It Fl access_log Ar file
74Access log file. Default: not set, no logging is done.
75.It Fl acl Ar (+|-)x.x.x.x[/x],...
76Specify access control list (ACL). ACL is a comma separated list
77of IP subnets, each subnet is prepended by '-' or '+' sign. Plus means allow,
78minus means deny. If subnet mask is
79omitted, like "-1.2.3.4", then it means single IP address. Mask may vary
80from 0 to 32 inclusive. On each request, full list is traversed, and
81last match wins. Default: not set, allow all.
82.It Fl admin_uri Ar uri
83If set,
84.Nm
85creates special administrative URI where options may be changed at runtime.
86This URI probably wants to be password-protected, look at
87.Fl protect
88option, and in the EXAMPLES section on how to do it. Default: not set.
89.It Fl aliases Ar list
90This options gives an ability to serve the directories outside web root
91by sort of symbolic linking to certain URI. The
92.Ar list
93must be comma-separated list of URI=PATH pairs, like this:
94"/etc/=/my_etc,/tmp=/my_tmp". Default: not set.
95.It Fl auth_PUT Ar file
96PUT and DELETE passwords file. This must be specified if PUT or
97DELETE methods are used. Default: not set.
98.It Fl auth_gpass Ar file
99Location of global passwords file. When set, per-directory .htpasswd files are
100ignored, and all accessed must be authorised against global passwords file.
101Default: not set.
102.It Fl auth_realm Ar domain_name
103Authorization realm. Default: "mydomain.com".
104.It Fl cgi_env Ar list
105Pass environment variables to the CGI script in addition to standard ones.
106The list must be comma-separated list of X=Y pairs, like this:
107"VARIABLE1=VALUE1,VARIABLE2=VALUE2".  Default: not set.
108.It Fl cgi_ext Ar list
109Comma-separated list of CGI extensions.  All files having these extensions
110are treated as CGI scripts. Default: "cgi,pl,php"
111.It Fl cgi_interp Ar file
112Force
113.Ar file
114to be a CGI interpreter for all CGI scripts. By default this option is not
115set, and
116.Nm
117decides which interpreter to use by looking at the first line of CGI script.
118.It Fl dir_list Ar yes|no
119Enable/disable directory listing. Default: "1" (enabled).
120.It Fl error_log Ar file
121Error log file. Default: not set, no errors are logged.
122.It Fl idle_time Ar num_seconds
123Number of seconds worker thread waits for some work before exit. Default: 10
124.It Fl max_threads Ar number
125Maximum number of worker threads to start. Default: 100
126.It Fl mime_types Ar list
127Additional to builtin mime types, in form
128"extension1=type1,extension2=type2,...". Extension must include dot.
129.It Fl ports Ar port_list
130Comma-separated list of ports to listen on. If the port is SSL, a letter 's'
131must be appeneded, for example, "-ports 80,443s" will open port 80 and port 443,
132and connections on port 443 will be SSL-ed. It is possible to specify an
133IP address to bind to. In this case, an IP address and a colon must be
134prepended to the port number, for example, "-ports 127.0.0.1:8080". Note that
135if SSL listening port is requested, then
136.Fl ssl_cert
137option must specified BEFORE
138.Fl ports
139option. Default: 8080
140.It Fl protect Ar list
141Comma separated list of URI=PATH pairs, specifying that given URIs
142must the protected with respected password files. Default: not set.
143.It Fl root Ar directory
144Location of the WWW root directory. Default: working directory from which
145.Nm
146has been started.
147.It Fl ssi_ext Ar list
148Comma separated list of SSI extensions. Default: "shtml,shtm".
149.It Fl ssl_cert Ar pem_file
150Location of SSL certificate file. Default: not set.
151.It Fl uid Ar login
152Switch to given user after startup. Default: not set.
153.El
154.Pp
155.Sh EMBEDDING
156.Nm
157was designed to be embeddable into C/C++ applications. Since the
158source code is contained in single C file, it is fairly easy to embed it,
159and to follow the updates. Please refer to http://code.google.com/p/mongoose
160for details.
161.Pp
162.Sh EXAMPLES
163.Bl -tag -width indent
164.It Nm Fl root Ar /var/www Fl ssl_cert Ar /etc/cert.pem Fl ports Ar 8080,8043s Fl aliases Ar /aa=/tmp,/bb=/etc
165Start listening on port 8080 for HTTP, and 8043 for HTTPS connections.
166Use /etc/cert.pem as SSL certificate file. Web root is /var/www. In addition,
167map directory /tmp to URI /aa, directory /etc to URI /bb.
168.It Nm Fl acl Ar -0.0.0.0/0,+10.0.0.0/8,+1.2.3.4
169Deny connections from everywhere, allow only IP address 1.2.3.4 and
170all IP addresses from 10.0.0.0/8 subnet to connect.
171.It Nm Fl admin_uri Ar /ctl Fl protect Ar /ctl=/tmp/passwords.txt
172Create an administrative URI "/ctl" where
173options may be changed at runtime, and protect that URI with authorization.
174.El
175.Pp
176.Sh COPYRIGHT
177.Nm
178is licensed under the terms of the MIT license.
179.Sh AUTHOR
180.An Sergey Lyubka Aq valenok@gmail.com .
Note: See TracBrowser for help on using the repository browser.