Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Several cleanups due to dialyzer, also moved the control file into us…

…ers HOME directory so that we don't have the problem of writing in /var when we're running as non-root

git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1223 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information...
commit d07115cd39499b8e70c6d699fcc583f4943232bf 1 parent 7cd4080
@klacke authored
View
1  include/yaws.hrl
@@ -89,7 +89,6 @@
phpexe = "/usr/bin/php-cgi", %% cgi capable php executable
yaws, %% server string
id = "default", %% string identifying this instance of yaws
- tmpdir,
enable_soap = false %% start yaws_soap_srv iff true
}).
View
7 man/yaws.conf.5
@@ -106,13 +106,6 @@ logrotate, set the size to \fI0\fR and Yaws will reopen the logfiles
once they have be renamed/removed.
.TP
-\fB tmpdir = Dir\fR
-Yaws generates files when generating dynamic content, i.e. when
-processing .yaws pages. These files end up in tmpdir. Default
-is $HOME/.yaws
-
-
-.TP
\fB log_resolve_hostname = Bool\fR
By default the client host IP is not resolved in the access logs.
View
15 src/Makefile
@@ -59,10 +59,20 @@ yaws_generated.erl: yaws_generated.template ../vsn.mk
. ../vsn.mk; \
sed -e "s/%VSN%/${YAWS_VSN}/" -e \
"s;%VARDIR%;${VARDIR};g" -e \
+ "s;%localinstall%;true;g" -e \
"s;%ETCDIR%;${ETCDIR};g" \
< yaws_generated.template > yaws_generated.erl
+## need to differentiate between local install and not
+regen:
+ . ../vsn.mk; \
+ sed -e "s/%VSN%/${YAWS_VSN}/" -e \
+ "s;%VARDIR%;${VARDIR};g" -e \
+ "s;%localinstall%;false;g" -e \
+ "s;%ETCDIR%;${ETCDIR};g" \
+ < yaws_generated.template > yaws_generated.erl
+
charset.def:
if [ ! -z "$(DEFAULT_CHARSET)" ]; then \
@@ -78,7 +88,7 @@ debug:
clean:
rm -f $(EBIN_FILES) yaws_generated.erl charset.def mime_types.erl
-install: all docsinstall
+install: regen all docsinstall
$(INSTALL) -d $(DESTDIR)/$(PREFIX)/lib/yaws/examples/ebin
$(INSTALL) -d $(DESTDIR)/$(PREFIX)/lib/yaws/examples/include
$(INSTALL) -d $(DESTDIR)/$(PREFIX)/lib/yaws/ebin
@@ -88,13 +98,12 @@ install: all docsinstall
(cd ..; tar cf - ebin ) | (cd $(DESTDIR)/$(PREFIX)/lib/yaws; tar xf - )
(cd ..; tar cf - include ) | (cd $(DESTDIR)/$(PREFIX)/lib/yaws; tar xf - )
(cd ..; tar cf - priv/*.xsd ) | (cd $(DESTDIR)/$(PREFIX)/lib/yaws; tar xf - )
+ $(RM) yaws_generated.erl ../ebin/yaws_generated.beam 2>/dev/null || true
docsinstall:
$(INSTALL) -d $(DESTDIR)/$(VARDIR)/yaws/www
(cd ..; tar cf - www ) | (cd $(DESTDIR)/$(VARDIR)/yaws; tar xf - )
-
-
tags:
erl -noshell -pa ../ebin -s yaws_debug mktags
View
41 src/yaws.erl
@@ -29,7 +29,7 @@
ssl_cacertfile/1, ssl_cacertfile/2,
ssl_ciphers/1, ssl_ciphers/2,
ssl_cachetimeout/1, ssl_cachetimeout/2]).
--export([is_modified_p/2]).
+-export([is_modified_p/2, tmpdir/0]).
-import(lists, [reverse/1, reverse/2]).
@@ -126,8 +126,6 @@ setup_gconf(GL, GC) ->
GC#gconf.yaws),
id = lkup(id, GL,
GC#gconf.id),
- tmpdir = lkup(tmpdir, GL,
- GC#gconf.tmpdir),
enable_soap = lkup(enable_soap, GL,
GC#gconf.enable_soap)
}.
@@ -241,7 +239,7 @@ dohup(Sock) ->
Err
end),
gen_event:notify(yaws_event_manager, {yaws_hupped, Res}),
- gen_event:notify(yaws_log, {minute10, '_'}),
+ gen_event:notify(yaws_log, {yaws_hupped, Res}),
gen_tcp:send(Sock, io_lib:format("hupped: ~p~n", [Res])),
gen_tcp:close(Sock).
@@ -1726,11 +1724,11 @@ uid_to_name(Uid) ->
end.
load_setuid_drv() ->
- Path = case code:priv_dir(yaws) of
- {error, _} ->
- %% localinstall
+ Path = case yaws_generated:is_local_install() of
+ true ->
filename:dirname(code:which(?MODULE)) ++ "/../priv/lib";
- PrivDir ->
+ false ->
+ PrivDir = code:priv_dir(yaws),
filename:join(PrivDir,"lib")
end,
case erl_ddll:load_driver(Path, "setuid_drv") of
@@ -2188,3 +2186,30 @@ redirect_scheme_port(SC) ->
PortPart = redirect_port(SC),
{Scheme, PortPart}.
+tmpdir() ->
+ case os:type() of
+ {win32,_} ->
+ case os:getenv("TEMP") of
+ false ->
+ case os:getenv("TMP") of
+ %%
+ %% No temporary path set?
+ %% Then try standard paths.
+ %%
+ false ->
+ case file:read_file_info("C:/WINNT/Temp") of
+ {error, _} ->
+ "C:/WINDOWS/Temp";
+ {ok, _} ->
+ "C:/WINNT/Temp"
+ end;
+ PathTMP ->
+ PathTMP
+ end;
+ PathTEMP ->
+ PathTEMP
+ end;
+ _ ->
+ filename:join([os:getenv("HOME"), ".yaws"])
+ end.
+
View
2  src/yaws_api.erl
@@ -433,8 +433,6 @@ do_parse_spec(QueryList, Spec, Last, Cur, State) when list(QueryList) ->
do_parse_spec(list_to_binary(QueryList), Spec, Last, Cur, State).
-
-
tail_spec(['ALLSTRINGS']) ->
[string, 'ALLSTRINGS'];
tail_spec(L) ->
View
2  src/yaws_compile.erl
@@ -300,7 +300,7 @@ new_out_file_name(Module, GC) ->
true ->
Module ++ ".erl";
_ ->
- filename:join([GC#gconf.tmpdir, "yaws",
+ filename:join([yaws:tmpdir(), "yaws",
GC#gconf.id, Module ++ ".erl"])
end.
View
46 src/yaws_config.erl
@@ -64,7 +64,7 @@ load(E) ->
?Debug("FLOAD: ~p", [R]),
case R of
{ok, GC5, Cs} ->
- yaws:mkdir(GC5#gconf.tmpdir),
+ yaws:mkdir(yaws:tmpdir()),
Cs2 = add_yaws_auth(Cs),
add_yaws_soap_srv(GC5),
validate_cs(GC5, Cs2);
@@ -261,40 +261,13 @@ make_default_gconf(Debug, Id) ->
?GC_FAIL_ON_BIND_ERR bor
?GC_PICK_FIRST_VIRTHOST_ON_NOMATCH
end,
- tmpdir = default_tmp_dir(),
+
yaws = "Yaws " ++ yaws_generated:version(),
id = Id
}.
-default_tmp_dir() ->
- case os:type() of
- {win32,_} ->
- case os:getenv("TEMP") of
- false ->
- case os:getenv("TMP") of
- %%
- %% No temporary path set?
- %% Then try standard paths.
- %%
- false ->
- case file:read_file_info("C:/WINNT/Temp") of
- {error, _} ->
- "C:/WINDOWS/Temp";
- {ok, _} ->
- "C:/WINNT/Temp"
- end;
- PathTMP ->
- PathTMP
- end;
- PathTEMP ->
- PathTEMP
- end;
- _ ->
- filename:join([os:getenv("HOME"), ".yaws"])
- end.
-
make_default_sconf() ->
Y = yaws_dir(),
#sconf{docroot = filename:join([Y, "www"])}.
@@ -506,14 +479,9 @@ fload(FD, globals, GC, C, Cs, Lno, Chars) ->
end;
["tmpdir", '=', TmpDir] ->
- Dir = filename:absname(TmpDir),
- case is_dir(Dir) of
- true ->
- fload(FD, globals, GC#gconf{tmpdir=Dir},
- C, Cs, Lno+1, Next);
- false ->
- {error, ?F("Expect directory at line ~w", [Lno])}
- end;
+ %% ignore
+ error_logger:format("tmpdir in yaws.conf is no longer supported\n",[]),
+ fload(FD, globals, GC,C, Cs, Lno+1, Next);
%% keep this bugger for backward compat for a while
["keepalive_timeout", '=', Val] ->
@@ -1029,11 +997,11 @@ fload(FD, server_auth, GC, C, Cs, Lno, Chars, Auth) ->
A2 = Auth#auth{mod = list_to_atom(Mod)},
fload(FD, server_auth, GC, C, Cs, Lno+1, Next, A2);
["user", '=', User] ->
- case string:tokens(User, ":") of
+ case (catch string:tokens(User, ":")) of
[Name, Passwd] ->
A2 = Auth#auth{users = [{Name, Passwd}|Auth#auth.users]},
fload(FD, server_auth, GC, C, Cs, Lno+1, Next, A2);
- false ->
+ _ ->
{error, ?F("Invalid user at line ~w", [Lno])}
end;
["pam", "service", '=', Serv] ->
View
29 src/yaws_ctl.erl
@@ -25,13 +25,7 @@
start(_GC, FirstTime) when FirstTime == false ->
ok;
start(GC, true) ->
- case proc_lib:start_link(?MODULE, run, [GC]) of
- ok ->
- ok;
- {error, RSN} ->
- error_logger:format("~s~n",[RSN]),
- erlang:error(RSN)
- end.
+ proc_lib:start_link(?MODULE, run, [GC]).
run(GC) ->
@@ -46,15 +40,13 @@ run(GC) ->
%% message
gen_tcp:close(Sock),
e("There is already a yaws system running with the same ~n"
- " id <~p> on this computer, ~n"
+ " id <~p> on this computer and this user, ~n"
" set another id in the yaws conf file ~n",
[GC#gconf.id]);
{error, eaccess} ->
%% We're not allowed to open the ctl file
- e("Error reading ~s, you are probably (sometimes) running ~n"
- " yaws as another userid, but with the same yaws id <~p> ~n"
- " set another id in the yaws conf file ~n",
- [ctl_file(GC#gconf.id), GC#gconf.id]);
+ e("Error reading ~s, you don't have access rights to read it",
+ [ctl_file(GC#gconf.id)]);
{error, _} ->
%% Fine, this should be the case
run_listen(GC)
@@ -127,7 +119,7 @@ w_ctl_file(Sid, Port, Key) ->
ctl_file(Sid) ->
- FN = filename:join([yaws_generated:ctldir(), "ctl-" ++ yaws:to_list(Sid)]),
+ FN = filename:join([ctldir(), "ctl-" ++ yaws:to_list(Sid)]),
filelib:ensure_dir(FN),
FN.
@@ -178,9 +170,7 @@ handle_a(A, GC, Key) ->
end;
{error, _} ->
- gen_tcp:close(A);
- _Err ->
- ignore
+ gen_tcp:close(A)
end.
@@ -349,7 +339,7 @@ s_cmd(Fd, SID, Key, Term) ->
%% List existing yaws nodes on this machine
ls(_) ->
- case file:list_dir(yaws_generated:ctldir()) of
+ case file:list_dir(ctldir()) of
{ok, List} ->
io:format("~-15s~-10s~-10s~n",
["Id", "Status", "Owner"]),
@@ -366,7 +356,7 @@ ls(_) ->
lls(CtlFile0 = "ctl-" ++ Id) ->
- CtlFile = filename:join([yaws_generated:ctldir(), CtlFile0]),
+ CtlFile = filename:join([ctldir(), CtlFile0]),
case {file:read_file_info(CtlFile),
file:read_file(CtlFile)} of
{{ok, FI}, {error, eacces}} ->
@@ -438,7 +428,8 @@ check([Id, File| IncludeDirs]) ->
trace([What, SID]) ->
actl(SID, {trace, What}).
-
+ctldir() ->
+ filename:join([yaws:tmpdir(), "CTL"]).
View
6 src/yaws_dav.erl
@@ -144,12 +144,12 @@ do_move(From, To) ->
out201();
_ ->
case file:copy(From, To) of
- ok ->
+ {ok,_} ->
ok = file:delete(From),
out201();
- Error ->
+ {error, Reason} ->
?elog("move from ~p to ~p failed: ~p\n",
- [From, To, Error]),
+ [From, To, Reason]),
out409()
end
end.
View
4 src/yaws_debug.erl
@@ -120,7 +120,7 @@ fail({{debug,Fstr}, File,Line,Fmt, Args}) ->
[Fstr, node(), filename:basename(File),
Line, self()])),
- case io:format(user, Str ++ Fmt ++ "~n", Args) of
+ case (catch io:format(user, Str ++ Fmt ++ "~n", Args)) of
ok -> ok;
_ -> io:format(user, "ERROR ~p:~p: Pid ~w: (bad format)~n~p,~p~n",
[File, Line, self(), Fmt, Args]),
@@ -129,7 +129,7 @@ fail({{debug,Fstr}, File,Line,Fmt, Args}) ->
end;
fail({format, File,Line,Fmt,Args}) ->
- case io:format(user, Fmt,Args) of
+ case (catch io:format(user, Fmt,Args)) of
ok -> ok;
_ ->
io:format(user, "ERROR ~p:~p: Pid ~w: (bad format)~n~p,~p~n",
View
8 src/yaws_generated.template
@@ -6,8 +6,6 @@
%%%----------------------------------------------------------------------
%% generated code from some environment variables
-%% especially VARDIR is important since it controls
-%% where the --hup and friends
-module(yaws_generated).
-author('klacke@bluetail.com').
@@ -18,8 +16,8 @@ version() -> "%VSN%".
vardir() -> "%VARDIR%".
-ctldir() -> "%VARDIR%/run/yaws".
-
etcdir() -> "%ETCDIR%".
-
+
+is_local_install() -> %localinstall%.
+
View
9 src/yaws_log.erl
@@ -374,7 +374,8 @@ handle_event(_Event, State) ->
handle_info(secs3, State) ->
{noreply, State#state{now = fmtnow()}};
-
+handle_info({notify,{yaws_hupped,_}}, State) ->
+ handle_info(minute10,State);
%% once every 10 minute, check log sizes
handle_info(minute10, State) ->
L = lists:map(
@@ -433,11 +434,7 @@ wrap(AL, State) ->
error_logger:format("Logfile ~p disapeared - we reopen it",
[AL#alog.filename]),
{ok, Fd2} = file:open(AL#alog.filename, [write, raw]),
- AL#alog{fd = Fd2};
- {'EXIT', Rsn} ->
- error_logger:format("Failed to wraplog ~p:~p~n",
- [AL#alog.filename, Rsn]),
- AL
+ AL#alog{fd = Fd2}
end.
View
8 src/yaws_revproxy.erl
@@ -429,8 +429,8 @@ rewrite_headers(PS, H) when PS#psock.type == server ->
%% Rewrite a properly formatted location redir
rewrite_loc_url(LocUrl, PS) ->
SC=get(sc),
- Scheme = yaws_server:redirect_scheme(SC),
- RedirHost = yaws_server:redirect_host(SC, PS#psock.r_host),
+ Scheme = yaws:redirect_scheme(SC),
+ RedirHost = yaws:redirect_host(SC, PS#psock.r_host),
_RealPath = LocUrl#url.path,
[Scheme, RedirHost, yaws:slash_append(PS#psock.prefix, LocUrl#url.path)].
@@ -441,8 +441,8 @@ rewrite_loc_url(LocUrl, PS) ->
rewrite_loc_rel(PS, Loc) ->
SC=get(sc),
- Scheme = yaws_server:redirect_scheme(SC),
- RedirHost = yaws_server:redirect_host(SC, PS#psock.r_host),
+ Scheme = yaws:redirect_scheme(SC),
+ RedirHost = yaws:redirect_host(SC, PS#psock.r_host),
[Scheme, RedirHost,Loc].
View
54 src/yaws_server.erl
@@ -149,10 +149,17 @@ init2(GC, Sconfs, RunMod, Embedded, FirstTime) ->
yaws_debug:format("Add path ~p~n", [D]),
code:add_pathz(D)
end, GC#gconf.ebin_dir),
- yaws_debug:format("Running with id=~p~n"
- "Running with debug checks turned on (slower server) ~n"
+ yaws_debug:format("Running with id=~p (localinstall=~p) ~n"
+ "~s"
"Logging to directory ~p~n",
- [GC#gconf.id, GC#gconf.logdir]),
+ [GC#gconf.id, yaws_generated:is_local_install(),
+ if ?gc_has_debug(GC) ->
+ "Running with debug checks "
+ "turned on (slower server) ~n";
+ true ->
+ ""
+ end,
+ GC#gconf.logdir]),
setup_dirs(GC),
@@ -241,12 +248,8 @@ handle_call({setconf, GC, Groups}, _From, State) ->
foreach(fun(Pid) ->
gserv_stop(Pid)
end, Curr),
- case init2(GC, Groups, undef, State#state.embedded, false) of
- {ok, State2} ->
- {reply, ok, State2};
- Err ->
- {reply, Err, #state{gc=GC, pairs=[], mnum=0}}
- end;
+ {ok, State2} = init2(GC, Groups, undef, State#state.embedded, false),
+ {reply, ok, State2};
handle_call(getconf, _From, State) ->
Groups = map(fun({_Pid, SCs}) -> SCs end, State#state.pairs),
@@ -268,7 +271,7 @@ handle_call({update_sconf, NewSc}, From, State) ->
P2 = yaws_config:update_sconf(NewSc2,
State#state.pairs),
{noreply, State#state{pairs = P2}}
- after 1000 ->
+ after 2000 ->
{reply, {error, "Failed to update new conf"}, State}
end
end;
@@ -435,9 +438,10 @@ gserv(Top, GC, Group0) ->
setup_dirs(GC) ->
- file:make_dir(GC#gconf.tmpdir),
- TD0 = filename:join([GC#gconf.tmpdir,"yaws"]),
+ file:make_dir(yaws:tmpdir()),
+ TD0 = filename:join([yaws:tmpdir(),"yaws"]),
file:make_dir(TD0),
+ file:make_dir(filename:join([yaws:tmpdir(),"yaws", "CTL"])),
TD1 = filename:join([TD0, GC#gconf.id]),
file:make_dir(TD1),
case file:list_dir(TD1) of
@@ -813,6 +817,9 @@ acceptor0(GS, Top) ->
{Top, accept} ->
acceptor0(GS, Top)
end;
+ {error, closed} ->
+ %% This is what happens when we call yaws --stop
+ exit(normal);
ERR ->
%% When we fail to accept, the correct thing to do
%% is to terminate yaws as an application, if we're running
@@ -1942,10 +1949,10 @@ do_yaws(CliSock, ARG, UT, N) ->
del_old_files(_, []) ->
ok;
-del_old_files(GC, [{_FileAtom, spec, _Mtime1, Spec, _}]) ->
+del_old_files(_GC, [{_FileAtom, spec, _Mtime1, Spec, _}]) ->
foreach(
fun({mod, _, _, _, Mod, _Func}) ->
- F=filename:join([GC#gconf.tmpdir, "yaws",
+ F=filename:join([yaws:tmpdir(), "yaws",
yaws:to_list(Mod) ++ ".erl"]),
code:purge(Mod),
code:purge(Mod),
@@ -2822,21 +2829,12 @@ get_more_post_data(PPS, ARG) ->
N = SC#sconf.partial_post_size,
Len = list_to_integer((ARG#arg.headers)#headers.content_length),
if N + PPS < Len ->
- case get_client_data(ARG#arg.clisock, N,
- is_ssl(SC#sconf.ssl)) of
- Bin when binary(Bin) ->
- {partial, Bin};
- Else ->
- {error, Else}
- end;
+ Bin = get_client_data(ARG#arg.clisock, N,
+ is_ssl(SC#sconf.ssl)),
+ {partial, Bin};
true ->
- case get_client_data(ARG#arg.clisock, Len - PPS,
- is_ssl(SC#sconf.ssl)) of
- Bin when binary(Bin) ->
- Bin;
- Else ->
- {error, Else}
- end
+ get_client_data(ARG#arg.clisock, Len - PPS,
+ is_ssl(SC#sconf.ssl))
end.
View
114 www/cgi.yaws
@@ -1,77 +1,103 @@
<erl>
+out(A) ->
+ {ssi, "TAB.inc", "%%",[{"cgi", "choosen"}]}.
+</erl>
-box(Str) ->
- {'div',[{class,"box"}],
- {pre,[], yaws_api:htmlize(Str)}}.
+<div id="entry">
-tbox(T) ->
- box(lists:flatten(io_lib:format("~p",[T]))).
+<h1>Plain CGI and PHP</h1>
+<p>
+ Yaws supports plain CGI just fine. The two most common ways to run yaws cgi script is either as regular cgi scripts or as php scripts through the typical php-cgi binary. Yaws chooses how to ship a file pased on file extension. Let's start with the php-cgi example. PHP files have the extension .php and if we enable php by indicating it in yaws.conf:
+</p>
+
+
+<div class="box">
+ <verbatim>
+ php_exe_path = /usr/bin/php-cgi
+ </verbatim>
+</div>
+
+<p>And then also ensure that we have enaable php processing for the individual server as in:
+</p>
-out(A) ->
- [{ssi, "TAB.inc", "%%",[{"cgi", "choosen"}]},
- {ehtml,
- {'div', [{id, "entry"}],
-
- [{h1, [], "Plain CGI and PHP"},
-
- {p,[],
- "Yaws supports plain CGI just fine. the two most common ways to run yaws cgi script is either as regular cgi scripts or as php scripts through the typical php-cgi binary. Yaws chooses how to ship a file pased on file extension. Let's start with the php-cgi example. PHP files have the extension .php and if we enable php by indicating it in yaws.conf:"},
- box("php_exe_path = /usr/bin/php-cgi"
- ),
- {p,[], "And then also ensure that we have enaable php processing for the individual server as in "},
- box("
+
+<div class="box">
+ <verbatim>
<server www.hyber.org>
port = 80
listen = 0.0.0.0
allowed_scripts = php yaws cgi
- ...."
- ),
- {p, [], "Yaws will invoke the php-cgi binary and talk the CGI protocol to the binary. "},
-
- {p, [], "Another common situation is that we write our CGI scripts in e.g. python and use python libraries to speak the CGI protocol. The easiest way forward here is to rename the python scripts with the extension \".cgi\" as in this example:"
- },
+ ....
+</server>
+ </verbatim>
+</div>
+
+<p>
+
+Yaws will invoke the php-cgi binary and talk the CGI protocol to the binary.
+</p>
+<p>
- {p, [], " We have the following python file called foo.cgi"},
- box("
+Another common situation is that we write our CGI scripts in e.g. python and use python libraries to speak the CGI protocol. The easiest way forward here is to rename the python scripts with the extension ".cgi" as in this example:
+</p>
+<p>
+We have the following python file called foo.cgi:
+</p>
+
+
+<div class="box">
+ <verbatim>
+
#!/usr/bin/python
import cgi
-print \"Content-type: text/html\n\n\"
-print \"<h1>hi there </h1>\"
- "),
+print "Content-type: text/html\n\n"
+print "<h1>hi there </h1>"
+ </verbatim>
+</div>
+<p>
+
+Since the file ends with the magic suffix ".cgi", Yaws will just invoke the file as an executable and speak CGI to it. Thus for this scheme to work we must also make the file exeutable.
+</p>
- {p, [], "Since the file ends with the magic suffix \".cgi\", Yaws will just invoke the file as an executable and speak CGI to it. Thus for this scheme to work we must also make the file exeutable"},
+<p>
+Yet another common scenario is when have a set of CGI files not ending with the \".cgi\" file extension. We can put all the CGI files in a common directory and define an appmod as follows:
+</p>
- {p, [], "Yet another common scenario is when have a set of CGI files not ending with the \".cgi\" file extension. We can put all the CGI files in a common directory and define an appmod as follows:"},
-box("
+<div class="box">
+ <verbatim>
out(Arg) ->
yaws_cgi:call_cgi(Arg, lists:flatten(Arg#arg.fullpath)).
-"),
-
-{p, [], "and then configure the appmod appropriately in yaws.conf. The default yaws.conf file contains an entry"},
-box("
- appmods = <cgi-bin, yaws_appmod_cgi>
-"),
-
-{p, [], "Thus if we put put any executable files in the \"cgi-bin\" directory under the docroot, Yaws will speak CGI to those executables."}
-
+ </verbatim>
+</div>
+<p>
+and then configure the appmod appropriately in yaws.conf. The default yaws.conf file contains an entry.
+</p>
-]}},
+<div class="box">
+ <verbatim>
+ appmods = <cgi-bin, yaws_appmod_cgi>
+ </verbatim>
+</div>
+<p>
+Thus if we put put any executable files in the \"cgi-bin\" directory under the docroot, Yaws will speak CGI to those executables.
+</p>
-{ssi, "END2",[],[]}
-].
+<erl>
+out(A) -> {ssi, "END2",[],[]}.
</erl>
+
View
5 www/embed.yaws
@@ -258,6 +258,11 @@ out(Arg) ->
<p>Thus passing data from the surrounding applications configuration routines
down to each .yaws web page.</p>
+<p>Another important fact to consider when choosing wether to run your yaws
+application as an embedded yaws app or not is that all the yaws control
+functions are disabled when we use yaws as an embedded web server. I.e
+yaws --ls, yaws --stop etc. This under the assumption that you already have support for this type of functionality in your application.
+</p>
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.