The configuration I decided to use is lighttpd from
 http://redmine.lighttpd.net/projects/lighttpd/wiki.

 I had it running with fossil within about a half hour.

 I am using Erlang Web for other projects and thought
 it would be "quick and easy" to get fossil running on
 it [on our DEV server].  I did not particularly want
 to run a separate web server for version repositories.  

 But, even with plain yaws I discovered that it behaved
 improperly with fossil (or vice versa) if I used any
 but the standard port 80.  Which I cannot do for our
 version control system, I need to run fossil on
 other-than-port-80.

 lighttpd is lightweight, was quickly configurable,
 and plays well with fossil on non-standard ports.
 And, since it is running on our DEV server, not a big
 problem to run a separate light-weight web server to
 serve up the version control repositories (and ticket
 system and wiki).

 And it helps keep Erlang Web directories clean for
 the "real" projects.

 thanks again,

~Michael



On Tue, Sep 01, 2009 at 03:29:25PM -0700, erlang...@autosys.us wrote:
>  Thank you, Michal.
> 
>  I am having some small success.  I will submit updated information
>  [and configuration] later when I get things working more suitably.
> 
> ~Michael
> 
> 
> On Tue, Sep 01, 2009 at 09:47:30AM +0200, Michal Zajda wrote:
> >    Hi,
> >    it is just theoretical because I never set up fossil, but I see several
> >    issues in Your config:
> >    1. in yaws.conf place ErlangWeb appmod in a front of rest of them
> >    2. place all fossil files in docroot (lets say in docroot/fossil)
> >    3. dispatcher should return then {static, "^/fossil", enoent}
> >    4. code from docroot should be executed
> >    In case You would like to have some authorisation (or similar action
> >    before serving content) :
> >    1. write a controller to handle authorisation (lets give it a name
> >    c_fossil)
> >    2. in case of yaws return from controller one of :
> >           {custom, {page, "/" ++ wpart:fget("__path")}}  %% <-- so the
> >    same place
> >        or
> >           {template, "docroot/fossil/some_index.html"}   %% <-- so it goes
> >    via out templating engine
> >    3. dispatcher differs here:
> >           {dynamic, "^/fosill", {c_fossil, read}}
> >    4. last but not least:
> >        4.1 in case of {template.. } be careful with dispatcher rules and
> >    docroot (remember that static rules are matched in the first place)
> >        4.2 in case of {custom.. } while the rule is dynamic it actually
> >    returns path /app/fossil/ (because of appmod) so You need to do symlink
> >    in docroot to the fossil directory. So, it fossil is placed in
> >    docroot/fossil then we need app/ directory in docroot and inside of
> >    that link to fossil dir
> >    {page.. } and 4.2 are not officialy supported ;) but it is good to know
> >    this is possible
> >    br
> >    Michal Z
> > 
> >    2009/9/1 Michael McDaniel <[1]erlang...@autosys.us>
> > 
> >       Hi, List.
> >       I want to run *.yaws and *.cgi files via erlang-web.
> >       Well, actually, I want to be able to serve fossil
> >       [[2]http://fossil-scm.org] repositories from within
> >       erlang-web (using yaws as backend), I'm not particularly
> >       stuck on using *.yaws and *.cgi though that is how I ran
> >       fossil using yaws alone.
> >       If I am only running yaws then I can do, e.g. the following
> >       to display (and work with) a fossil repository :
> >        /usr/local/etc/yaws/yaws.conf
> >          ...
> >          <server localhost>
> >               port    = 80
> >               listen  = 127.0.0.1
> >               docroot = /usr/local/var/yaws/www
> >               appmods = <cgi-bin, yaws_appmod_cgi>
> >          </server>
> >      ---
> >       /usr/local/var/yaws/www/block_clone.yaws
> >          <erl>
> >            out(Arg) ->
> >               yaws_cgi:call_cgi(Arg,
> >                  "/usr/local/var/yaws/www/cgi-bin/block_clone.cgi").
> >          </erl>
> >      ---
> >       /usr/local/var/yaws/www/cgi-bin/block_clone.cgi
> >         #!/usr/local/bin/fossil
> >         repository: /tmp/cloned_repositories/block_clone.fossil
> >      --
> >       and, when pointing browser at
> >        [3]http://localhost/block_clone.yaws/
> >       I get the fossil index page, and all the links work.
> >      ---
> >       and, for Erlang Web, I have tried various combinations
> >       of, e.g.
> >       templates/fossil.html
> >      <?xml version="1.0" encoding="utf-8"?>
> >      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> >      "[4]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> >      <html xmlns="[5]http://www.w3.org/1999/xhtml";>
> >      <head>
> >       <title>Fossil repositories</title>
> >       <script src="cgi/foo.cgi" type="text/html"> </script>
> >      </head>
> >      </html>
> >                   ^^^^^^^^^^^^^
> >           also changed this to "fossil.yaws"
> >           which calls the cgi file
> >       The cgi file is executable.  The repository is readable.
> >       The cgi directory is a subdirectory of templates directory.
> >       So, how can I serve fossil repositories via erlang-web whether
> >       with *.yaws and cgi or not.  Of course, using yaws as the
> >       backend web server for Erlang Web.
> >       I tried similar configuration and various combinations
> >       in dispatch.conf, e.g. {static, "^/fossil$", "fossil.yaws"}.
> >       but the best I can get is no error and a blank page in
> >       the browser.
> >       Please if you have a suggestion (especially one you have
> >       used successfully) to run *.yaws and *.cgi within
> >       Erlang Web, please provide it.
> >       If there is online documentation I have not found it so
> >       a pointer to docs which may help out would be appreciated
> >       as well.
> >       Also, the above is the simplest case of delivering a single
> >       fossil repository.  I actually plan to provide multiple
> >       repositories (which I have done using yaws only) as described here,
> >       [6]http://www.fossil-scm.org/index.html/wiki?name=Cookbook#CGI
> >       I think I am missing something basic because even a simple
> >       hello.cgi gives a blank page
> >       #!/bin/bash
> >       echo "hello"
> >      ~Michael
> >      --------------------------------------------------------------------
> >      ----------
> >      Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> >      30-Day
> >      trial. Simplify your report design, integration and deployment - and
> >      focus on
> >      what you do best, core application coding. Discover what's new with
> >      Crystal Reports now.  [7]http://p.sf.net/sfu/bobj-july
> >      _______________________________________________
> >      Erlangweb-users mailing list
> >      [8]erlangweb-us...@lists.sourceforge.net
> >      [9]https://lists.sourceforge.net/lists/listinfo/erlangweb-users
> >      [10]http://www.erlang-web.org/
> > 
> > References
> > 
> >    1. mailto:erlang...@autosys.us
> >    2. http://fossil-scm.org/
> >    3. http://localhost/block_clone.yaws/
> >    4. http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
> >    5. http://www.w3.org/1999/xhtml
> >    6. http://www.fossil-scm.org/index.html/wiki?name=Cookbook#CGI
> >    7. http://p.sf.net/sfu/bobj-july
> >    8. mailto:Erlangweb-users@lists.sourceforge.net
> >    9. https://lists.sourceforge.net/lists/listinfo/erlangweb-users
> >   10. http://www.erlang-web.org/
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Erlangweb-users mailing list
> Erlangweb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/erlangweb-users
> http://www.erlang-web.org/

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Erlangweb-users mailing list
Erlangweb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlangweb-users
http://www.erlang-web.org/

Reply via email to