Permalink
Newer
Older
100644 176 lines (148 sloc) 5.33 KB
""
Jun 13, 2002
1
.TH YAWS "1" "" "" "User Commands"
2
.SH NAME
3
yaws \- yet another webserver
4
.SH SYNOPSIS
5
.B yaws
6
[\fIOPTIONS\fR]
7
.SH DESCRIPTION
8
.\" Add any additional description here
9
.PP
10
Yaws is fast lightweight webserver. It can run as daemon or
11
in interactive mode where it is possible to directly interact
12
with the webserver. Yaws is particularly good at generating
13
dynamic content. See the user docs for more information on that topic.
14
""
Jun 13, 2002
18
.TP
""
Jun 13, 2002
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
24
\fB\-w | --winteractive\fR
25
Cygwin inteactive mode (werl)
26
\fB\--daemon\fR
""
Jun 13, 2002
27
Daemon mode. This will start yaws as a daemon.
28
.TP
30
This will cause the yaws system to be automatically restarted
31
in case it should crash. This switch also require the \fI--daemon\fR
32
switch to be present.
33
.TP
""
Jun 13, 2002
35
Debug mode. This will produce some auxilliary error output for some
36
error conditions. It will also start the otp sasl lib for additional
37
error printouts.
38
""
Jun 13, 2002
39
.TP
""
Jun 13, 2002
41
Use a different configuration file than the default. The default configuration file
42
when running as root is /etc/yaws.conf. When running as a non priviliged user, yaws
43
will search for its configuration file in the following order. First in
44
$HOME/yaws.conf, then in ./yaws.conf and finally in /etc/yaws.conf
45
.TP
47
Tells yaws to call \fImodule:start/0\fR at startup. This makes it possible
48
to startup user specific applications together with yaws.
52
Add path to the yaws system search path
53
54
.TP
""
Jun 13, 2002
56
Traffic trace mode. All traffic will be written to a trace file called trace.traffic
57
in the log directory.
""
Jun 13, 2002
59
.TP
""
Jun 13, 2002
61
HTTP trace mode. All HTTP messages will be written to a trace file called trace.http
62
in the log directory.
65
\fB\--traceout\fR
66
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.
69
\fB\--trace\fR
70
Sames as --tracetraf --traceout. I.e. trace everything and write to stdout.
71
72
.TP
73
\fB\--mnesiadir dir\fR
74
Start Mnesia in directory <dir>
75
76
.TP
78
Start yaws as a distributed erlang node with name <xxx>
79
using the unqualified hostname as nodename postfix
80
81
.TP
82
\fB\--name xxx\fR
83
Start yaws as a distributed erlang node with name <xxx> using the
84
fully qualified hostname as nodename postfix
88
Use module Mod for erlang distribution. This is typically only used
89
when we want to run erlang distribution over SSL.
90
91
.TP
93
Pass STRING as an additional argument to the "erl" program.
96
.TP
97
\fB\--id ID\fR
98
This flag sets the id. If we're starting a daemon (or an interactive
99
system) it gives the Yaws server the identity ID. This means that the
100
server will write all internal files into the directory
101
$HOME/.yaws/ID.
102
103
Yaws also creates a file called
104
${VARDIR}/run/yaws/ctl-${ID} which contains the portnumber the daemon
105
is listening on for control request by the control command such
106
as "yaws --hup" etc.
107
108
If we're invoking a control command which should perform some
109
control function on the daemon, we may have to give the --id flag also
110
to the control command. If we don't do this the control command
111
may interact with the wrong daemon due to finding the wrong "ctl" file.
112
113
The daemon may also optionally specify the "id" in the yaws.conf
114
configuration file.
115
116
.SH CONTROL OPTIONS
117
.PP
118
The following list of options are are used to control the daemon
119
from the "outside" while it is running.
120
""
Jun 13, 2002
121
.TP
123
HUP the daemon. This forces the daemon to reread the configuration file.
124
It also makes
125
the daemon empty all its internal content caches.
126
Hence when updating the doc root,
""
Jun 13, 2002
127
HUPing the daemon is the fastest way to see the content updates.
128
.TP
""
Jun 13, 2002
131
.TP
132
\fB\--ls \fR
133
Lists current ids and status of all yaws servers on localhost. In practice this
134
amounts to a listdir in $HOME/.yaws/yaws - and check wether the different
135
systems who has created files there are alive.
Aug 24, 2003
138
Query a running yaws daemon for its status, and print it.
139
.TP
Aug 24, 2003
141
Try to (re)load erlang modules into a running daemon. This is useful
142
after modifying appmods or modules used by scripts.
144
.TP
145
\fB--debug-dump [--id id]\fR
146
Produce a debug dump on stdout. In particular this code lists what
147
we refer to as suspicious processes. I.e. processes that might be
148
hanging or processes that are "large" - hardcoded to 40k words.
149
151
\fB--ctltrace [--id ID] http | traffic | off\fR
152
Control the trace capabilities of a running yaws daemon. If the
153
http or traffic option is given, the daemon will write a log
154
for debug purposes into the logdir.
155
Jan 8, 2009
156
.TP
157
\fB--wait-started [--id ID] \fR
158
Waits at most 5 seconds for the server to start. Exits with 0 if
159
server is running, 1 otherwise. Typically useful in test scripts.
Aug 24, 2003
163
.TP
164
\fB--check YawsFile [IncDirs ....]\fR
165
Test compile a `.yaws' file. Useful in Makefiles when we want to ensure
166
that all .yaws files are syntactically correct
Aug 24, 2003
167
.TP
""
Jun 13, 2002
169
output version information and exit
170
.SH AUTHOR
171
Written by Claes Wikstrom
172
.SH "SEE ALSO"
173
.BR yaws.conf (5)
174
.BR erl (1)
175