Skip to content
This repository
Newer
Older
100644 237 lines (203 sloc) 7.595 kb
639b7c24 »
2002-06-13 ""
1 .TH YAWS "1" "" "" "User Commands"
2 .SH NAME
3 yaws \- yet another webserver
4 .SH SYNOPSIS
5 .B yaws
3a6c4c2b » vinoski
2009-09-21 document yaws --nodebug option
6 [\fIOPTIONS\fR]
639b7c24 »
2002-06-13 ""
7 .SH DESCRIPTION
8 .\" Add any additional description here
9 .PP
10 Yaws is fast lightweight webserver. It can run as daemon or
3a6c4c2b » vinoski
2009-09-21 document yaws --nodebug option
11 in interactive mode where it is possible to directly interact
639b7c24 »
2002-06-13 ""
12 with the webserver. Yaws is particularly good at generating
13 dynamic content. See the user docs for more information on that topic.
14
ee35df4e » vinoski
2010-08-03 add --umask option to yaws script
15 .SH DAEMON/SERVER options
dc00e526 »
2004-03-10 postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
16
17
639b7c24 »
2002-06-13 ""
18 .TP
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
19 \fB\-i | --interactive\fR
639b7c24 »
2002-06-13 ""
20 Interactive mode. This will start yaws in interactive mode with an erlang
21 prompt. All error_logger messages will be written to the tty as well in this
22 mode. Use this when developing yaws code.
23 .TP
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
24 \fB\-w | --winteractive\fR
25 Cygwin inteactive mode (werl)
814bae12 »
2009-02-13 cleaned up the redirect feature. It was poorly implemented and poorly…
26 .TP
27 \fB\-D | --daemon\fR
639b7c24 »
2002-06-13 ""
28 Daemon mode. This will start yaws as a daemon.
29 .TP
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
30 \fB\--heart\fR
a2a82e3a » Tobbe Tornquist
2002-06-20 Added the -heart switch
31 This will cause the yaws system to be automatically restarted
2ba58053 » vinoski
2009-04-13 add new --heart-restart option to allow control over heart restarts
32 in case it should crash. This switch also requires the \fI--daemon\fR
a2a82e3a » Tobbe Tornquist
2002-06-20 Added the -heart switch
33 switch to be present.
34 .TP
2ba58053 » vinoski
2009-04-13 add new --heart-restart option to allow control over heart restarts
35 \fB\--heart-restart=C,T\fR
36 This controls the number of restarts in a given time period that heart
37 tolerates before refusing to restart Yaws. By default, heart allows up
38 to 5 restarts within a 60 second period before refusing to restart
39 Yaws again. This option allows up to \fIC\fR restarts in \fIT\fR
40 seconds instead. To allow infinite restarts, set both \fIC\fR and
41 \fIT\fR to 0. This switch automatically enables the \fI--heart\fR
42 switch.
43 .TP
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
44 \fB\--debug\fR
2ba58053 » vinoski
2009-04-13 add new --heart-restart option to allow control over heart restarts
45 Debug mode. This will produce some auxiliary error output for some
dc00e526 »
2004-03-10 postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
46 error conditions. It will also start the otp sasl lib for additional
47 error printouts.
3a6c4c2b » vinoski
2009-09-21 document yaws --nodebug option
48 .TP
49 \fB\--nodebug\fR
50 Non-debug mode. This is useful for running interactively via the
51 \FI-i\fR option but without incurring the performance penalties of
52 debug mode.
dc00e526 »
2004-03-10 postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
53
639b7c24 »
2002-06-13 ""
54 .TP
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
55 \fB\--conf file\fR
639b7c24 »
2002-06-13 ""
56 Use a different configuration file than the default. The default configuration file
49fc86fe »
2009-07-03 docs and also don't fail if authmod:get_headers() don't exist
57 when running as root is /etc/yaws/yaws.conf. When running as a non priviliged user, yaws
639b7c24 »
2002-06-13 ""
58 will search for its configuration file in the following order. First in
49fc86fe »
2009-07-03 docs and also don't fail if authmod:get_headers() don't exist
59 $HOME/yaws.conf, then in ./yaws.conf and finally in /etc/yaws/yaws.conf
639b7c24 »
2002-06-13 ""
60 .TP
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
61 \fB\--runmod module\fR
22fd7887 » Tobbe Tornquist
2002-06-17 Added the '-r <Mod>' switch.
62 Tells yaws to call \fImodule:start/0\fR at startup. This makes it possible
63 to startup user specific applications together with yaws.
dc00e526 »
2004-03-10 postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
64
65 .TP
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
66 \fB\--pa path\fR
dc00e526 »
2004-03-10 postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
67 Add path to the yaws system search path
68
22fd7887 » Tobbe Tornquist
2002-06-17 Added the '-r <Mod>' switch.
69 .TP
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
70 \fB\--tracetraf\fR
639b7c24 »
2002-06-13 ""
71 Traffic trace mode. All traffic will be written to a trace file called trace.traffic
72 in the log directory.
dc00e526 »
2004-03-10 postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
73
639b7c24 »
2002-06-13 ""
74 .TP
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
75 \fB\--tracehttp\fR
639b7c24 »
2002-06-13 ""
76 HTTP trace mode. All HTTP messages will be written to a trace file called trace.http
77 in the log directory.
82d6e294 »
2003-08-25 added -x flag for tty trace and did the 1.3 release
78
79 .TP
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
80 \fB\--traceout\fR
3a6c4c2b » vinoski
2009-09-21 document yaws --nodebug option
81 When yaws is put into trace mode using either --tracetraf or --tracehttp, traces are written to files. If we provide the --traceout flag, the trace will also be written to stdout.
82d6e294 »
2003-08-25 added -x flag for tty trace and did the 1.3 release
82
c7c87a4c »
2003-08-25 -sname and mnesia flag added to start script
83 .TP
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
84 \fB\--trace\fR
85 Sames as --tracetraf --traceout. I.e. trace everything and write to stdout.
86
87 .TP
88 \fB\--mnesiadir dir\fR
c7c87a4c »
2003-08-25 -sname and mnesia flag added to start script
89 Start Mnesia in directory <dir>
90
91 .TP
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
92 \fB\--sname xxx\fR
c7c87a4c »
2003-08-25 -sname and mnesia flag added to start script
93 Start yaws as a distributed erlang node with name <xxx>
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
94 using the unqualified hostname as nodename postfix
95
96 .TP
a90bd689 »
2009-01-27 added kpoll as default
97 \fB\--disable-kpoll\fR
98 By default, yaws starts erlang with \fI+K true\fR. This flag
99 reverses that.
100
101 .TP
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
102 \fB\--name xxx\fR
103 Start yaws as a distributed erlang node with name <xxx> using the
104 fully qualified hostname as nodename postfix
82d6e294 »
2003-08-25 added -x flag for tty trace and did the 1.3 release
105
37e9d70b »
2005-06-07 -erlarg patch by Fredrik Thulin
106 .TP
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
107 \fB\--proto_dist Mod\fR
37e9d70b »
2005-06-07 -erlarg patch by Fredrik Thulin
108 Use module Mod for erlang distribution. This is typically only used
109 when we want to run erlang distribution over SSL.
110
111 .TP
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
112 \fB\--erlarg STRING\fR
fd5e6024 » vinoski
2010-05-11 Augment yaws man page with --erlarg argument quoting info
113 Pass STRING as an additional argument to the "erl" program. If STRING
114 comprises multiple words, you must quote it so that your shell passes
115 it to yaws as a single argument. If STRING contains any single quote
116 characters, you must quote each of them as well. For example, to pass
117 the option \fI-env NAME O'Keeffe\fR to "erl" from a Bourne-compatible
118 shell:
119 .PP
120 .nf
121 .ce
122 --erlarg "-env NAME O\\'Keeffe"
123 .fi
dc00e526 »
2004-03-10 postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
124
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
125 .TP
126 \fB\--id ID\fR
3a6c4c2b » vinoski
2009-09-21 document yaws --nodebug option
127 This flag sets the id. If we're starting a daemon (or an interactive
128 system) it gives the Yaws server the identity ID. This means that the
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
129 server will write all internal files into the directory
d63642ed » vinoski
2009-12-14 do not pass the --id option if the default id is used
130 $HOME/.yaws/yaws/ID.
c9778e01 »
2006-04-27 added support for 2 additional configure
131
3a6c4c2b » vinoski
2009-09-21 document yaws --nodebug option
132 Yaws also creates a file called
c9778e01 »
2006-04-27 added support for 2 additional configure
133 ${VARDIR}/run/yaws/ctl-${ID} which contains the portnumber the daemon
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
134 is listening on for control request by the control command such
135 as "yaws --hup" etc.
136
137 If we're invoking a control command which should perform some
c9778e01 »
2006-04-27 added support for 2 additional configure
138 control function on the daemon, we may have to give the --id flag also
3a6c4c2b » vinoski
2009-09-21 document yaws --nodebug option
139 to the control command. If we don't do this the control command
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
140 may interact with the wrong daemon due to finding the wrong "ctl" file.
141
142 The daemon may also optionally specify the "id" in the yaws.conf
143 configuration file.
144
ee35df4e » vinoski
2010-08-03 add --umask option to yaws script
145 .TP
146 \fB\--umask MASK\fR
147 Set the umask for the daemon to MASK.
148
dc00e526 »
2004-03-10 postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
149 .SH CONTROL OPTIONS
150 .PP
151 The following list of options are are used to control the daemon
152 from the "outside" while it is running.
153
639b7c24 »
2002-06-13 ""
154 .TP
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
155 \fB\--hup [--id ID]\fR
3a6c4c2b » vinoski
2009-09-21 document yaws --nodebug option
156 HUP the daemon. This forces the daemon to reread the configuration file.
dc00e526 »
2004-03-10 postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
157 It also makes
3a6c4c2b » vinoski
2009-09-21 document yaws --nodebug option
158 the daemon empty all its internal content caches.
dc00e526 »
2004-03-10 postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
159 Hence when updating the doc root,
3a6c4c2b » vinoski
2009-09-21 document yaws --nodebug option
160 HUPing the daemon is the fastest way to see the content updates.
639b7c24 »
2002-06-13 ""
161 .TP
674c8b3a »
2007-09-07 git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk…
162 \fB\--stop [--id id]\fR
dc00e526 »
2004-03-10 postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
163 Stop the daemon (called id)
639b7c24 »
2002-06-13 ""
164 .TP
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
165 \fB\--ls \fR
166 Lists current ids and status of all yaws servers on localhost. In practice this
d63642ed » vinoski
2009-12-14 do not pass the --id option if the default id is used
167 amounts to a listdir in $HOME/.yaws/yaws - and check whether the different
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
168 systems who has created files there are alive.
d659ba32 »
2004-05-26 added a 'yaws -ls' command that lists all yaws servers on localhost
169 .TP
674c8b3a »
2007-09-07 git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk…
170 \fB--status [--id id]\fR
6155cc48 » carsten3347
2003-08-24 -S, -load, -check
171 Query a running yaws daemon for its status, and print it.
172 .TP
abe28336 »
2009-07-03 minor docs for new stats feature
173 \fB--stats [--id id]\fR
174 Query a running yaws daemon for its statistics, and print it.
175 .TP
3a6c4c2b » vinoski
2009-09-21 document yaws --nodebug option
176 \fB--load Modules [--id id]\fR
6155cc48 » carsten3347
2003-08-24 -S, -load, -check
177 Try to (re)load erlang modules into a running daemon. This is useful
178 after modifying appmods or modules used by scripts.
dc00e526 »
2004-03-10 postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
179
180 .TP
3a6c4c2b » vinoski
2009-09-21 document yaws --nodebug option
181 \fB--debug-dump [--id id]\fR
182 Produce a debug dump on stdout. In particular this code lists what
5207102c »
2008-05-17 Added debug dump functionality
183 we refer to as suspicious processes. I.e. processes that might be
184 hanging or processes that are "large" - hardcoded to 40k words.
185
186 .TP
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
187 \fB--ctltrace [--id ID] http | traffic | off\fR
dc00e526 »
2004-03-10 postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
188 Control the trace capabilities of a running yaws daemon. If the
189 http or traffic option is given, the daemon will write a log
190 for debug purposes into the logdir.
191
ddf3bee5 »
2009-01-08 preparing for 1.78
192 .TP
2ba58053 » vinoski
2009-04-13 add new --heart-restart option to allow control over heart restarts
193 \fB--wait-started[=T] [--id ID] \fR
ddf3bee5 »
2009-01-08 preparing for 1.78
194 Waits at most 5 seconds for the server to start. Exits with 0 if
2ba58053 » vinoski
2009-04-13 add new --heart-restart option to allow control over heart restarts
195 server is running, 1 otherwise. Typically useful in test scripts. The
196 default 5 seconds can be modified by appending \fI=T\fR to the option,
197 where \fIT\fR is the desired number of seconds to wait for the server
198 to start.
dc00e526 »
2004-03-10 postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
199
200 .SH MISC OPTIONS
201
6155cc48 » carsten3347
2003-08-24 -S, -load, -check
202 .TP
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
203 \fB--check YawsFile [IncDirs ....]\fR
204 Test compile a `.yaws' file. Useful in Makefiles when we want to ensure
205 that all .yaws files are syntactically correct
6155cc48 » carsten3347
2003-08-24 -S, -load, -check
206 .TP
92bafb48 »
2006-03-09 removed the ability change userid, also stopped writing to /tmp/yaws …
207 \fB\--version\fR
639b7c24 »
2002-06-13 ""
208 output version information and exit
5f13a9c1 »
2009-02-17 Two patches by Joseph Wayen Norton, one dbg-bug and one providing bet…
209
210 .SH ENVIRONMENT VARIABLES
211 .TP
212 \fBHOME\fR
213 Is used to determine where we write the temporary files. By default
214 all tmp files end up in $HOME/.yaws. This includes the JIT files
3a6c4c2b » vinoski
2009-09-21 document yaws --nodebug option
215 that are the result of processed .yaws files and also the so called
5f13a9c1 »
2009-02-17 Two patches by Joseph Wayen Norton, one dbg-bug and one providing bet…
216 control file that is used by the daemon to write the port number
217 to which it is listening for control commands such as "yaws --status"
218
219 Thus HOME is the handle we use in the control commands to
220 find the control file so that we know where to connect to.
221
222 .TP
223 \fBYAWSHOME\fR
3a6c4c2b » vinoski
2009-09-21 document yaws --nodebug option
224 Can be used to override the HOME variable. This is useful when we
5f13a9c1 »
2009-02-17 Two patches by Joseph Wayen Norton, one dbg-bug and one providing bet…
225 for example are running yaws under port binding programs such as
226 authpriv.
227
228 It's useful by distros that don't want Yaws to write any files
3a6c4c2b » vinoski
2009-09-21 document yaws --nodebug option
229 ever in the HOME directory of root.
5f13a9c1 »
2009-02-17 Two patches by Joseph Wayen Norton, one dbg-bug and one providing bet…
230
231
232
639b7c24 »
2002-06-13 ""
233 .SH AUTHOR
234 Written by Claes Wikstrom
235 .SH "SEE ALSO"
236 .BR yaws.conf (5)
237 .BR erl (1)
238
Something went wrong with that request. Please try again.