Skip to content
jj1bdx edited this page Sep 3, 2011 · 3 revisions

Running MoinMoin on Yaws is easy, with spawn-fcgi (git page at stbuehler.de) used as the FastCGI interface for MoinMoin.

This is an example for serving MoinMoin with the IP address 127.0.0.1 port 23456 through Yaws, with the backend spawn-fcgi running at 127.0.0.1 port 23457.

yaws.conf

<server moin.example.org>
    port = 23456
    listen = 127.0.0.1
    listen_backlog = 100
    docroot = /home/yaws/docs/moin.example.org
    fcgi_app_server = 127.0.0.1:23457
</server>

/home/yaws/docs/moin.example.org/ contains:

index.yaws <- redirection script to call moin.fcgi
moin.fcgi  <- a dummy file for invoking FastCGI
htdocs/    <- directory of the static contents (served by Yaws)

index.yaws

<html>
<head></head>
<body>
<erl>
out(_Arg) ->
    {redirect_local, "/moin.fcgi";}.
</erl>
</body>
</html>

Notes

  • The actual moin.fcgi is invoked from spawn-fcgi. A ucspi-tcp tcpserver run file example:

      #!/bin/sh
      PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/bin; export PATH
      exec 2>&1
      exec setuidgid www \
       /usr/local/bin/spawn-fcgi \
       -n \
       -a 127.0.0.1 -p 23457 \
       -d /home/moin \
       -- \
      /home/moin/moin.fcgi
      # end of run file
    
  • The MoinMoin URL is at http://moin.example.org/moin.fcgi

Clone this wiki locally