git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
EWEric Wong <normalperson@yhbt.net>
Date
May 3, 2010, 20:56 UTC
Message-ID
<20100503205624.GA3791@dcvr.yhbt.net>
In-Reply-To
<201005020317.42112.jnareb@gmail.com>
Jakub Narebski <jnareb@gmail.com> wrote:
Show 30 quoted lines
> 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"
> +               ;;
> 
> The default standalone web server used by plackup (HTTP::Server::PSGI)
> does not have daemon mode, so we would have to do the same as for moongose
> web server: set to background and save pid in pidfile in git-instaweb.
> 
> OTOH plackup prints information / logs to STDERR, so it would have to be
> silenced or redirected to error_log.  Also plackup does not need to have
> "$fqgitdir/gitweb/httpd.conf" passed as last argument, but it needs to
> be passed PSGI wrapper for CGI (I'd rather not use httpd.conf, but rather
> app.psgi or gitweb.psgi for that).
> 
> 
> 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?
Hi Jakub,

How about generating a small shell script that wraps plackup with the appropriate command-line options?

-- 
Eric Wong
Previous: Jakub NarebskiNext: Jakub Narebski
Message 2 of 3 in “Adding support for "plackup" and similar web server tools to git-instaweb”
  1. Jakub NarebskiMay 2, 2010
  2. Eric WongMay 3, 2010
  3. Jakub NarebskiMay 3, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.