Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 206 lines (170 sloc) 6.332 kb
639b7c2 @klacke ""
authored
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
dc00e52 @klacke postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
authored
15 .SH DEAMON/SERVER options
16
17
639b7c2 @klacke ""
authored
18 .TP
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
19 \fB\-i | --interactive\fR
639b7c2 @klacke ""
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 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
24 \fB\-w | --winteractive\fR
25 Cygwin inteactive mode (werl)
814bae1 @klacke cleaned up the redirect feature. It was poorly implemented and poorly…
authored
26 .TP
27 \fB\-D | --daemon\fR
639b7c2 @klacke ""
authored
28 Daemon mode. This will start yaws as a daemon.
29 .TP
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
30 \fB\--heart\fR
a2a82e3 Added the -heart switch
Tobbe Tornquist authored
31 This will cause the yaws system to be automatically restarted
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
32 in case it should crash. This switch also require the \fI--daemon\fR
a2a82e3 Added the -heart switch
Tobbe Tornquist authored
33 switch to be present.
34 .TP
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
35 \fB\--debug\fR
639b7c2 @klacke ""
authored
36 Debug mode. This will produce some auxilliary error output for some
dc00e52 @klacke postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
authored
37 error conditions. It will also start the otp sasl lib for additional
38 error printouts.
39
639b7c2 @klacke ""
authored
40 .TP
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
41 \fB\--conf file\fR
639b7c2 @klacke ""
authored
42 Use a different configuration file than the default. The default configuration file
43 when running as root is /etc/yaws.conf. When running as a non priviliged user, yaws
44 will search for its configuration file in the following order. First in
45 $HOME/yaws.conf, then in ./yaws.conf and finally in /etc/yaws.conf
46 .TP
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
47 \fB\--runmod module\fR
22fd788 Added the '-r <Mod>' switch.
Tobbe Tornquist authored
48 Tells yaws to call \fImodule:start/0\fR at startup. This makes it possible
49 to startup user specific applications together with yaws.
dc00e52 @klacke postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
authored
50
51 .TP
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
52 \fB\--pa path\fR
dc00e52 @klacke postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
authored
53 Add path to the yaws system search path
54
22fd788 Added the '-r <Mod>' switch.
Tobbe Tornquist authored
55 .TP
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
56 \fB\--tracetraf\fR
639b7c2 @klacke ""
authored
57 Traffic trace mode. All traffic will be written to a trace file called trace.traffic
58 in the log directory.
dc00e52 @klacke postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
authored
59
639b7c2 @klacke ""
authored
60 .TP
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
61 \fB\--tracehttp\fR
639b7c2 @klacke ""
authored
62 HTTP trace mode. All HTTP messages will be written to a trace file called trace.http
63 in the log directory.
82d6e29 @klacke added -x flag for tty trace and did the 1.3 release
authored
64
65 .TP
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
66 \fB\--traceout\fR
67 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 @klacke added -x flag for tty trace and did the 1.3 release
authored
68
c7c87a4 @klacke -sname and mnesia flag added to start script
authored
69 .TP
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
70 \fB\--trace\fR
71 Sames as --tracetraf --traceout. I.e. trace everything and write to stdout.
72
73 .TP
74 \fB\--mnesiadir dir\fR
c7c87a4 @klacke -sname and mnesia flag added to start script
authored
75 Start Mnesia in directory <dir>
76
77 .TP
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
78 \fB\--sname xxx\fR
c7c87a4 @klacke -sname and mnesia flag added to start script
authored
79 Start yaws as a distributed erlang node with name <xxx>
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
80 using the unqualified hostname as nodename postfix
81
82 .TP
a90bd68 @klacke added kpoll as default
authored
83 \fB\--disable-kpoll\fR
84 By default, yaws starts erlang with \fI+K true\fR. This flag
85 reverses that.
86
87 .TP
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
88 \fB\--name xxx\fR
89 Start yaws as a distributed erlang node with name <xxx> using the
90 fully qualified hostname as nodename postfix
82d6e29 @klacke added -x flag for tty trace and did the 1.3 release
authored
91
37e9d70 @klacke -erlarg patch by Fredrik Thulin
authored
92 .TP
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
93 \fB\--proto_dist Mod\fR
37e9d70 @klacke -erlarg patch by Fredrik Thulin
authored
94 Use module Mod for erlang distribution. This is typically only used
95 when we want to run erlang distribution over SSL.
96
97 .TP
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
98 \fB\--erlarg STRING\fR
37e9d70 @klacke -erlarg patch by Fredrik Thulin
authored
99 Pass STRING as an additional argument to the "erl" program.
dc00e52 @klacke postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
authored
100
101
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
102 .TP
103 \fB\--id ID\fR
104 This flag sets the id. If we're starting a daemon (or an interactive
105 system) it gives the Yaws server the identity ID. This means that the
106 server will write all internal files into the directory
c9778e0 @klacke added support for 2 additional configure
authored
107 $HOME/.yaws/ID.
108
109 Yaws also creates a file called
110 ${VARDIR}/run/yaws/ctl-${ID} which contains the portnumber the daemon
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
111 is listening on for control request by the control command such
112 as "yaws --hup" etc.
113
114 If we're invoking a control command which should perform some
c9778e0 @klacke added support for 2 additional configure
authored
115 control function on the daemon, we may have to give the --id flag also
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
116 to the control command. If we don't do this the control command
117 may interact with the wrong daemon due to finding the wrong "ctl" file.
118
119 The daemon may also optionally specify the "id" in the yaws.conf
120 configuration file.
121
dc00e52 @klacke postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
authored
122 .SH CONTROL OPTIONS
123 .PP
124 The following list of options are are used to control the daemon
125 from the "outside" while it is running.
126
639b7c2 @klacke ""
authored
127 .TP
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
128 \fB\--hup [--id ID]\fR
dc00e52 @klacke postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
authored
129 HUP the daemon. This forces the daemon to reread the configuration file.
130 It also makes
131 the daemon empty all its internal content caches.
132 Hence when updating the doc root,
639b7c2 @klacke ""
authored
133 HUPing the daemon is the fastest way to see the content updates.
134 .TP
674c8b3 @klacke git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk…
authored
135 \fB\--stop [--id id]\fR
dc00e52 @klacke postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
authored
136 Stop the daemon (called id)
639b7c2 @klacke ""
authored
137 .TP
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
138 \fB\--ls \fR
139 Lists current ids and status of all yaws servers on localhost. In practice this
140 amounts to a listdir in $HOME/.yaws/yaws - and check wether the different
141 systems who has created files there are alive.
d659ba3 @klacke added a 'yaws -ls' command that lists all yaws servers on localhost
authored
142 .TP
674c8b3 @klacke git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk…
authored
143 \fB--status [--id id]\fR
6155cc4 @carsten3347 -S, -load, -check
carsten3347 authored
144 Query a running yaws daemon for its status, and print it.
145 .TP
674c8b3 @klacke git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk…
authored
146 \fB--load Modules [--id id]\fR
6155cc4 @carsten3347 -S, -load, -check
carsten3347 authored
147 Try to (re)load erlang modules into a running daemon. This is useful
148 after modifying appmods or modules used by scripts.
dc00e52 @klacke postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
authored
149
150 .TP
5207102 @klacke Added debug dump functionality
authored
151 \fB--debug-dump [--id id]\fR
152 Produce a debug dump on stdout. In particular this code lists what
153 we refer to as suspicious processes. I.e. processes that might be
154 hanging or processes that are "large" - hardcoded to 40k words.
155
156 .TP
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
157 \fB--ctltrace [--id ID] http | traffic | off\fR
dc00e52 @klacke postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
authored
158 Control the trace capabilities of a running yaws daemon. If the
159 http or traffic option is given, the daemon will write a log
160 for debug purposes into the logdir.
161
ddf3bee @klacke preparing for 1.78
authored
162 .TP
163 \fB--wait-started [--id ID] \fR
164 Waits at most 5 seconds for the server to start. Exits with 0 if
165 server is running, 1 otherwise. Typically useful in test scripts.
dc00e52 @klacke postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…
authored
166
167 .SH MISC OPTIONS
168
6155cc4 @carsten3347 -S, -load, -check
carsten3347 authored
169 .TP
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
170 \fB--check YawsFile [IncDirs ....]\fR
171 Test compile a `.yaws' file. Useful in Makefiles when we want to ensure
172 that all .yaws files are syntactically correct
6155cc4 @carsten3347 -S, -load, -check
carsten3347 authored
173 .TP
92bafb4 @klacke removed the ability change userid, also stopped writing to /tmp/yaws …
authored
174 \fB\--version\fR
639b7c2 @klacke ""
authored
175 output version information and exit
5f13a9c @klacke Two patches by Joseph Wayen Norton, one dbg-bug and one providing bet…
authored
176
177 .SH ENVIRONMENT VARIABLES
178 .TP
179 \fBHOME\fR
180 Is used to determine where we write the temporary files. By default
181 all tmp files end up in $HOME/.yaws. This includes the JIT files
182 that are the result of processed .yaws files and also the so called
183 control file that is used by the daemon to write the port number
184 to which it is listening for control commands such as "yaws --status"
185
186 Thus HOME is the handle we use in the control commands to
187 find the control file so that we know where to connect to.
188
189 .TP
190 \fBYAWSHOME\fR
191 Can be used to override the HOME variable. This is useful when we
192 for example are running yaws under port binding programs such as
193 authpriv.
194
195 It's useful by distros that don't want Yaws to write any files
196 ever in the HOME directory of root.
197
198
199
639b7c2 @klacke ""
authored
200 .SH AUTHOR
201 Written by Claes Wikstrom
202 .SH "SEE ALSO"
203 .BR yaws.conf (5)
204 .BR erl (1)
205
Something went wrong with that request. Please try again.