1YAWS(1)                          User Commands                         YAWS(1)
2
3
4

NAME

6       yaws - yet another webserver
7

SYNOPSIS

9       yaws [OPTIONS]
10

DESCRIPTION

12       Yaws is fast lightweight webserver. It can run as daemon or in interac‐
13       tive mode where it is possible to directly interact with the webserver.
14       Yaws  is  particularly good at generating dynamic content. See the user
15       docs for more information on that topic.
16
17

DAEMON/SERVER options

19       -i | --interactive
20              Interactive mode. This will start yaws in interactive mode  with
21              an  erlang  prompt. All error_logger messages will be written to
22              the tty as well in this mode.  Use  this  when  developing  yaws
23              code.
24
25       -w | --winteractive
26              Cygwin inteactive mode (werl)
27
28       -D | --daemon
29              Daemon mode. This will start yaws as a daemon.
30
31       --heart
32              This will cause the yaws system to be automatically restarted in
33              case it should crash. This switch  also  requires  the  --daemon
34              switch to be present.
35
36       --heart-restart=C,T
37              This controls the number of restarts in a given time period that
38              heart tolerates before refusing to  restart  Yaws.  By  default,
39              heart  allows  up to 5 restarts within a 60 second period before
40              refusing to restart Yaws again.  This  option  allows  up  to  C
41              restarts  in  T seconds instead. To allow infinite restarts, set
42              both C and T to 0. This switch automatically enables the --heart
43              switch.
44
45       --debug
46              Debug  mode.  This  will produce some auxiliary error output for
47              some error conditions. It will also start the otp sasl  lib  for
48              additional error printouts.
49
50       --nodebug
51              Non-debug mode. This is useful for running interactively via the
52              -i option but without incurring  the  performance  penalties  of
53              debug mode.
54
55
56       --conf file
57              Use a different configuration file than the default. The default
58              configuration file when running as root is  /etc/yaws/yaws.conf.
59              When  running as a non priviliged user, yaws will search for its
60              configuration  file   in   the   following   order.   First   in
61              $HOME/yaws.conf,    then   in   ./yaws.conf   and   finally   in
62              /etc/yaws/yaws.conf
63
64       --runmod module
65              Tells yaws to call module:start/0 at startup. This makes it pos‐
66              sible to startup user specific applications together with yaws.
67
68
69       --pa path
70              Add path to the yaws system search path
71
72
73       --tracetraf
74              Traffic  trace mode. All traffic will be written to a trace file
75              called trace.traffic in the log directory.
76
77
78       --tracehttp
79              HTTP trace mode. All HTTP messages will be written  to  a  trace
80              file called trace.http in the log directory.
81
82
83       --traceout
84              When  yaws  is  put  into trace mode using either --tracetraf or
85              --tracehttp, traces are written to  files.  If  we  provide  the
86              --traceout flag, the trace will also be written to stdout.
87
88
89       --trace
90              Sames as --tracetraf --traceout. I.e. trace everything and write
91              to stdout.
92
93
94       --mnesiadir dir
95              Start Mnesia in directory <dir>
96
97
98       --sname xxx
99              Start yaws as a distributed erlang node with  name  <xxx>  using
100              the unqualified hostname as nodename postfix
101
102
103       --disable-kpoll
104              By  default, yaws starts erlang with +K true. This flag reverses
105              that.
106
107
108       --name xxx
109              Start yaws as a distributed erlang node with  name  <xxx>  using
110              the fully qualified hostname as nodename postfix
111
112
113       --proto_dist Mod
114              Use  module  Mod for erlang distribution. This is typically only
115              used when we want to run erlang distribution over SSL.
116
117
118       --erlarg STRING
119              Pass STRING as an additional argument to the "erl"  program.  If
120              STRING  comprises multiple words, you must quote it so that your
121              shell passes it to yaws as a single argument. If STRING contains
122              any  single  quote  characters,  you  must quote each of them as
123              well. For example, to pass the  option  -env  NAME  O'Keeffe  to
124              "erl" from a Bourne-compatible shell:
125
126                           --erlarg "-env NAME O\'Keeffe"
127
128
129       --id ID
130              This  flag sets the id. If we're starting a daemon (or an inter‐
131              active system) it gives the Yaws server the  identity  ID.  This
132              means  that  the  server  will write all internal files into the
133              directory $HOME/.yaws/yaws/ID.
134
135              Yaws also creates  a  file  called  ${VARDIR}/run/yaws/ctl-${ID}
136              which  contains  the  portnumber  the daemon is listening on for
137              control request by the control command such as "yaws --hup" etc.
138
139              If we're invoking a control command which  should  perform  some
140              control  function  on  the  daemon, we may have to give the --id
141              flag also to the control command. If we don't do this  the  con‐
142              trol  command  may interact with the wrong daemon due to finding
143              the wrong "ctl" file.
144
145              The daemon may also optionally specify the "id" in the yaws.conf
146              configuration file.
147
148
149       --umask MASK
150              Set the umask for the daemon to MASK.
151
152

CONTROL OPTIONS

154       The  following  list of options are are used to control the daemon from
155       the "outside" while it is running.
156
157
158       --hup [--id ID]
159              HUP the daemon. This forces the daemon to reread the  configura‐
160              tion file.  It also makes the daemon empty all its internal con‐
161              tent caches.  Hence when updating the doc root, HUPing the  dae‐
162              mon is the fastest way to see the content updates.
163
164       --stop [--id id]
165              Stop the daemon (called id)
166
167       --ls   Lists  current  ids and status of all yaws servers on localhost.
168              In practice this amounts to a listdir in $HOME/.yaws/yaws -  and
169              check  whether the different systems who has created files there
170              are alive.
171
172       --status [--id id]
173              Query a running yaws daemon for its status, and print it.
174
175       --stats [--id id]
176              Query a running yaws daemon for its statistics, and print it.
177
178       --load Modules [--id id]
179              Try to (re)load erlang modules into a running daemon.   This  is
180              useful after modifying appmods or modules used by scripts.
181
182
183       --debug-dump  [--id id]
184              Produce  a  debug  dump on stdout. In particular this code lists
185              what we refer to as suspicious processes.  I.e.  processes  that
186              might  be  hanging  or processes that are "large" - hardcoded to
187              40k words.
188
189
190       --ctltrace [--id ID] http | traffic | off
191              Control the trace capabilities of a running yaws daemon. If  the
192              http or traffic option is given, the daemon will write a log for
193              debug purposes into the logdir.
194
195
196       --wait-started[=T] [--id ID]
197              Waits at most 5 seconds for the server to start. Exits with 0 if
198              server  is  running,  1  otherwise.  Typically  useful  in  test
199              scripts. The default 5 seconds can be modified by  appending  =T
200              to  the option, where T is the desired number of seconds to wait
201              for the server to start.
202
203

MISC OPTIONS

205       --check YawsFile [IncDirs ....]
206              Test compile a `.yaws' file. Useful in Makefiles when we want to
207              ensure that all .yaws files are syntactically correct
208
209       --version
210              output version information and exit
211
212

ENVIRONMENT VARIABLES

214       HOME   Is  used  to  determine  where  we write the temporary files. By
215              default all tmp files end up in $HOME/.yaws. This  includes  the
216              JIT  files that are the result of processed .yaws files and also
217              the so called control file that is used by the daemon  to  write
218              the  port  number  to which it is listening for control commands
219              such as "yaws --status"
220
221              Thus HOME is the handle we use in the control commands  to  find
222              the control file so that we know where to connect to.
223
224
225       YAWSHOME
226              Can  be  used to override the HOME variable. This is useful when
227              we for example are running yaws under port binding programs such
228              as authpriv.
229
230              It's  useful  by distros that don't want Yaws to write any files
231              ever in the HOME directory of root.
232
233
234
235

AUTHOR

237       Written by Claes Wikstrom
238

SEE ALSO

240       yaws.conf(5) erl(1)
241
242
243
244
245                                                                       YAWS(1)
Impressum