[BBLISA] [Summary] Wiki Guidance + Apache mod_rewrite question

Steve Revilak srevilak at speakeasy.net
Wed Oct 27 21:33:41 EDT 2004


> From: Rick Pike <rpike at pikesys.com>

> Apache Question
> =============
> Anyway I have set up UseModWiki in Apache as hostcomputer/cgi-bin/wiki.pl
> but want to set up hostcomputer/wiki as an alias. Having done this in the
> distant past, I thought I understood how to do this with mod_rewrite, but
> the alias just gives me the source, not the output. I have tried all kinds
> of variations, but so far nothing works.

Since usemodwiki is a single CGI, an easy thing to enable it is:

  DOCUMENT_ROOT=/path/to/web/server/document/root
  mkdir $DOCUMENT_ROOT/wiki/
  mv wiki.pl $DOCUMENT_ROOT/wiki/index.cgi
  chmod a+rx $DOCUMENT_ROOT/wiki/index.cgi
  # you can also put images, .css files, etc in the
  # wiki directory

In your apache configuration

  # these need to be uncommented
  LoadModule cgi_module         libexec/mod_cgi.so
  AddModule mod_cgi.c

  # Add "index.cgi" to your DirectoryIndex directive (sans quotes)
  # should look something like:
  DirectoryIndex index.htm index.html index.cgi

  # make sure this is uncommented
  AddHandler cgi-script .cgi

  # for the directory containing the cgi, make sure that
  # you enable cgi execution in that directory - or in a containing
  # scope
  Options +ExecCGI

After HUP-ing your server

  http://hostcomputer/wiki/

should work.

These are 1.3 configuration directives; if you're using apache 2.0,
there will be some small differences.

Of course, there are a number of other ways to configure cgi scripts -
this is just *one* option.




More information about the bblisa mailing list