-
Notifications
You must be signed in to change notification settings - Fork 268
Setup cgit
etnt edited this page Sep 13, 2010
·
2 revisions
You need to setup an appmod, which we name cgit .
In your /etc/yaws.conf :
... ebin_dir = /arkiv/home/www/site/www/cgit/ebi ... % in your server context appmods = <cgit , cgit>
Then we have the appmod, as shown below:
-module(cgit). -export([out/1]). %%% Compile: erlc -I /usr/local/lib -o ebin cgit.erl -include_lib("yaws/include/yaws_api.hrl"). out(Arg) -> Pathinfo = Arg#arg.pathinfo, Env = [{"PATH_INFO", Pathinfo}, {"SCRIPT_NAME", "/cgit"}], yaws_cgi:call_cgi(Arg, undefined, script(), Pathinfo, Env). script() -> "/var/www/htdocs/cgit/cgit.cgi".