Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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