Re: Adding support for "plackup" and similar web server tools to git-instaweb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 3 May 2010, Eric Wong wrote:
> Jakub Narebski <jnareb@xxxxxxxxx> wrote:
> >
> > The problem is that contrary to other web servers that can be used by
> > git-instaweb, (namely apache2, lighttpd, mongoose and webrick), the
> > 'plackup' utility is configured using command line options, and not
> > via configuration file (well, one can use configuration file, but it
> > depends on the web server run from plackup).
> > 
> > How should one go with adding support for such httpd?  My first attempt
> > was putting full command line into 'httpd' in resolve_full_httpd():
> > 
> > +       *plackup*)
> > +               # plackup is configured via command-line options
> > +               bind=
> > +               test x"$local" = xtrue && bind="--host=127.0.0.1"
> > +               httpd="$httpd --port=$port $bind --app=$fqgitdir/gitweb/app.psgi"
> > +               ;;
[...]
> > So how should one go with adding support for new web server to git-instaweb,
> > that is configured via command line options (--port, --host) and not via
> > config file?
> 
> How about generating a small shell script that wraps plackup with the
> appropriate command-line options?

 RFC1925 - The Twelve Networking Truths                      1 April 1996
 
 2. The Fundamental Truths

         (6a) (corollary). It is always possible to add another level of
              indirection.

Just kidding...


More seriously, even currently in git-instaweb the 'httpd' variable
contains web server invocation *with options* (see the case of apache2
and lighttpd, where resolve_full_httpd() ensures that 'httpd' ends
with '-f' in such case.  Using 'httpd' variable to be plackup-with-options
naturally follows from such example.

Shell script (plackup.sh?  gitweb-plackup.sh?  instaweb-plackup.sh?)
might be good idea, though.  Note that we have to create gitweb.psgi
(or app.psgi) CGI-to-PSGI wrapper (and to serve static files like 
gitweb.css) anyway by git-instaweb.

-- 
Jakub Narebski
Poland
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]